-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't workingtestkitAkka.Hosting.TestKit fixes and issues.Akka.Hosting.TestKit fixes and issues.
Milestone
Description
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))
{
var update1 = Dsl.Update(CounterKey, GCounter.Empty, WriteLocal.Instance,
g => g.Increment(selfAddress));
replicator.Tell(update1);
UpdateSuccess success1 = 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))
{
var update1 = Dsl.Update(CounterKey, GCounter.Empty, WriteLocal.Instance,
g => g.Increment(selfAddress));
replicator.Tell(update1, TestActor);
UpdateSuccess success1 = ExpectMsg<UpdateSuccess>();
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtestkitAkka.Hosting.TestKit fixes and issues.Akka.Hosting.TestKit fixes and issues.