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

Port Akka.Tests.Actor tests to async/await - BugFix4823Spec #5769

Merged
merged 8 commits into from
Mar 29, 2022
6 changes: 3 additions & 3 deletions src/core/Akka.Tests/Actor/BugFix4823Spec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public BugFix4823Spec(ITestOutputHelper outputHelper) : base(outputHelper)
}

[Fact]
public void Actor_should_not_loose_self_context_after_async_call()
public async Task Actor_should_not_loose_self_context_after_async_call()
{
var identity = ActorOfAsTestActorRef<MyActor>(Props.Create(() => new MyActor(TestActor)), TestActor);
identity.Tell(NotUsed.Instance);
var selfBefore = ExpectMsg<IActorRef>();
var selfAfter = ExpectMsg<IActorRef>();
var selfBefore = await ExpectMsgAsync<IActorRef>();
var selfAfter = await ExpectMsgAsync<IActorRef>();
selfAfter.Should().Be(selfBefore);
}

Expand Down