Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,10 @@ public void Should_recover_persistentactor_sqlite()
ExpectTerminated(recoveryActor);

// recreate the actor and recover
var recoveryActor2 = Sys.ActorOf(Props.Create(() => new RecoverActor(TestActor)), recoveryActor.Path.Name);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the Terminated is received, this actor should be safe to recreate again right away.

If it's not - we should do a "double-tap" and get a second ExpectTerminated instead of an AwaitAssert in this case.


AwaitAssert(() =>
{
var recoveryActor2 = Sys.ActorOf(Props.Create(() => new RecoverActor(TestActor)), recoveryActor.Path.Name);

var r2 = ExpectMsg<IEnumerable<string>>(TimeSpan.FromMilliseconds(100));
r2.Should().Contain(new[] { "foo", "bar" });
}, interval:TimeSpan.FromMilliseconds(150));
var r2 = ExpectMsg<IEnumerable<string>>();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a longer timeout instead of AwaitAssert

r2.Should().Contain(new[] { "foo", "bar" });
}

[Fact]
Expand Down