OrleansTestKit
OrleansTestKit copied to clipboard
TestStreamSubscriptionHandle.ResumeAsync NotImplementedException
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
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.
#114 appears to have closed this