OrleansContrib / OrleansTestKit

Unit Test Toolkit for Microsoft Orleans
http://dotnet.github.io/orleans
MIT License
76 stars 42 forks source link

Grain Call Filters #119

Closed amcorch closed 6 months ago

amcorch commented 2 years ago

Is there any support for Grain Filters while using this test kit? I have grains that implement IIncomingGrainCallFilter, however it seems like the Invoke call is not executed when a grain method is called from my unit test.

jkonecki commented 1 year ago

There's no support. When you execute a method on the grain you are doing it directly. Test Silo doesn't support registering grain filters and therefore doesn't execute them.

You can either test your grain filter separatelly, by writing a unit test for it, or execute the filter manually inside your unit test.

seniorquico commented 6 months ago

I agree- the TestKit is focused on testing a "simulated grain activation context", and call filters are outside this context. This is out of scope for the TestKit.