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
Version Information
Version of Akka.NET? 1.0.3
Which Akka.NET Modules? Akka.Hosting.TestKit
Describe the bug
foreach(var i in Enumerable.Range(0,2)){varupdate1= Dsl.Update(CounterKey, GCounter.Empty, WriteLocal.Instance,g => g.Increment(selfAddress));
replicator.Tell(update1);UpdateSuccesssuccess1=ExpectMsg<UpdateSuccess>();}
Fails and UpdateSuccess is a DeadLetter - this is because ActorRefs.NoSender is the sender.
Expected behavior
TestActor should be the implicit sender, just like in the normal testkit.
Actual behavior
There is no implicit sender.
Workaround
Can explicitly specify the TestActor as the sender.
foreach(var i in Enumerable.Range(0,2)){varupdate1= Dsl.Update(CounterKey, GCounter.Empty, WriteLocal.Instance,g => g.Increment(selfAddress));
replicator.Tell(update1, TestActor);UpdateSuccesssuccess1=ExpectMsg<UpdateSuccess>();}
The text was updated successfully, but these errors were encountered:
It would be nice if this can be fixed. We are currently migrating to Akka.Hosting in this is one of the little roadblocks as we have to touch a lot of places for this workaround.
Other than that Akka.Hosting is a great addition, it makes a lot of custom code unnecessary. We had our own system of registering root actors in .Net DI, had our own Testkit with DI support etc etc.
Version Information
Version of Akka.NET? 1.0.3
Which Akka.NET Modules? Akka.Hosting.TestKit
Describe the bug
Fails and
UpdateSuccess
is aDeadLetter
- this is becauseActorRefs.NoSender
is the sender.Expected behavior
TestActor
should be the implicit sender, just like in the normal testkit.Actual behavior
There is no implicit sender.
Workaround
Can explicitly specify the
TestActor
as the sender.The text was updated successfully, but these errors were encountered: