Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harden Bugfix4360Spec #5256

Merged
merged 2 commits into from
Sep 6, 2021
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
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
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