From 116621c57362c4b299ae30fa9d00490dd22e9c1b Mon Sep 17 00:00:00 2001 From: Gregorius Soedharmo Date: Fri, 29 Apr 2022 20:37:22 +0700 Subject: [PATCH] Convert Akka.Remote.Tests to async - Serialization.SerializationTransportInformationSpec --- .../SerializationTransportInformationSpec.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/Akka.Remote.Tests/Serialization/SerializationTransportInformationSpec.cs b/src/core/Akka.Remote.Tests/Serialization/SerializationTransportInformationSpec.cs index 64b68e490f5..20733f4d0ca 100644 --- a/src/core/Akka.Remote.Tests/Serialization/SerializationTransportInformationSpec.cs +++ b/src/core/Akka.Remote.Tests/Serialization/SerializationTransportInformationSpec.cs @@ -115,7 +115,7 @@ private void VerifyTransportInfo() public abstract class AbstractSerializationTransportInformationSpec : AkkaSpec { - public static readonly Config Config = @" + private static readonly Config Config = @" akka { loglevel = info actor @@ -151,7 +151,7 @@ protected AbstractSerializationTransportInformationSpec(Config config, ITestOutp public Address System2Address => RARP.For(System2).Provider.DefaultAddress; [Fact] - public void Serialization_of_ActorRef_in_remote_message_must_resolve_Address() + public async Task Serialization_of_ActorRef_in_remote_message_must_resolve_Address() { System2.ActorOf(act => { @@ -160,28 +160,28 @@ public void Serialization_of_ActorRef_in_remote_message_must_resolve_Address() var echoSel = Sys.ActorSelection(new RootActorPath(System2Address) / "user" / "echo"); echoSel.Tell(new Identify(1)); - var echo = ExpectMsg().Subject; + var echo = (await ExpectMsgAsync()).Subject; echo.Tell(new TestMessage(TestActor, echo)); - var t1 = ExpectMsg(); + var t1 = await ExpectMsgAsync(); t1.From.Should().Be(TestActor); t1.To.Should().Be(echo); echo.Tell(new JsonSerTestMessage(TestActor, echo)); - var t2 = ExpectMsg(); + var t2 = await ExpectMsgAsync(); t2.From.Should().Be(TestActor); t2.To.Should().Be(echo); echo.Tell(TestActor); - ExpectMsg(TestActor); + await ExpectMsgAsync(TestActor); echo.Tell(echo); - ExpectMsg(echo); + await ExpectMsgAsync(echo); } protected override async Task AfterAllAsync() { - await ShutdownAsync(System2, verifySystemShutdown: true); + await ShutdownAsync(System2); await base.AfterAllAsync(); } }