OrleansTestKit icon indicating copy to clipboard operation
OrleansTestKit copied to clipboard

TestStreamSubscriptionHandle.ResumeAsync NotImplementedException

Open rvplauborg opened this issue 4 years ago • 2 comments

Hi,

We use TestKitBase for unit testing grains, but I am encountering when attempting to call a method that resumes handlers in the grain, a NotImplementedException on TestStreamSubscriptionHandle.ResumeAsync. It makes sense when I read the code, since it is actually not implemented and set to throw this exception. But is there a reason for this? Are we not meant to call grain code that resumes stream subscriptions from a unit test, or what am I missing?

Best regards

rvplauborg avatar Apr 23 '20 08:04 rvplauborg

tbh, I think these weren't implemented because we only use implicit subscriptions in our projects and always call IAsyncStream<T>.SubscribeAsync. 👀🙂

To add support for ResumeAsync, I think we need a new method on TestStream that creates a TestStreamSubscriptionHandle not yet associated with an observer. In ResumeAsync, we'd have to find a way to pass the observer back up to the TestStream. This might also necessitate a change in the unsubscribe callback.

seniorquico avatar Apr 24 '20 17:04 seniorquico

#114 appears to have closed this

amccool avatar Jun 06 '22 14:06 amccool