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

Conversation

Aaronontheweb
Copy link
Member

The AwaitAssert is actually what made this spec racy

The `AwaitAssert` is actually what made this spec racy
@Aaronontheweb Aaronontheweb added tests akka-persistence-sql-common Akka.Persistence.Sql.Common labels Sep 6, 2021
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) September 6, 2021 16:59
@@ -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.

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

@Aaronontheweb Aaronontheweb merged commit b39bce3 into akkadotnet:dev Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
akka-persistence-sql-common Akka.Persistence.Sql.Common tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant