You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pattern works fine at runtime in Orleans, but fails in the test kit.
namespaceTests{publicclassBaseGrain:Grain{// IAddressable.GetPrimaryKeyString()protectedstringMyGrainKey=>this.GetPrimaryKeyString();}publicclassDumbGrain:BaseGrain,IDumb{publicTask<string>Duh(){// IGrainWithStringKey.GetPrimaryKeyString()return Task.FromResult(this.GetPrimaryKeyString());}publicTask<string>Doh(){return Task.FromResult(MyGrainKey);}}publicinterfaceIDumb:IGrainWithStringKey{Task<string>Duh();Task<string>Doh();}publicclassBasicGrainTests:TestKitBase{[Fact]publicasync Task TestDumbGrain(){IDumbgrain=await Silo.CreateGrainAsync<DumbGrain>("foo");// OKawait grain.Duh();/* System.ArgumentException Passing a half baked grain as an argument. It is possible that you instantiated a grain class explicitly, as a regular object and not via Orleans runtime or via proper test mocking (Parameter 'grain') at Orleans.GrainExtensions.GetGrainId(IAddressable grain) at Orleans.GrainExtensions.GetPrimaryKeyString(IAddressable grain) */await grain.Doh();}}
The text was updated successfully, but these errors were encountered:
This pattern works fine at runtime in Orleans, but fails in the test kit.
The text was updated successfully, but these errors were encountered: