Skip to content

Commit

Permalink
Port Akka.Tests.Actor tests to async/await - BugFix2176Spec (#5826)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Apr 6, 2022
1 parent 52ed1dd commit 49c87aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/Akka.Tests/Actor/BugFix2176Spec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// </copyright>
//-----------------------------------------------------------------------

using System.Threading.Tasks;
using Akka.Actor;
using Akka.TestKit;
using Xunit;
Expand Down Expand Up @@ -55,17 +56,17 @@ protected override void PreStart()
}

[Fact]
public void Fix2176_Constructor_Should_create_valid_child_actor()
public async Task Fix2176_Constructor_Should_create_valid_child_actor()
{
var actor = Sys.ActorOf(Props.Create(() => new Actor1NonAsync(TestActor)), "actor1");
ExpectMsg("started");
await ExpectMsgAsync("started");
}

[Fact]
public void Fix2176_RunTask_Should_create_valid_child_actor()
public async Task Fix2176_RunTask_Should_create_valid_child_actor()
{
var actor = Sys.ActorOf(Props.Create(() => new Actor1(TestActor)), "actor1");
ExpectMsg("started");
await ExpectMsgAsync("started");
}
}
}

0 comments on commit 49c87aa

Please sign in to comment.