Skip to content

Commit 0655628

Browse files
Port Akka.Tests.Actor tests to async/await - ContextWatchWithSpec, ConfigurationSpec (#5827)
Co-authored-by: Aaron Stannard <[email protected]>
1 parent 49c87aa commit 0655628

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/core/Akka.Tests/Actor/ContextWatchWithSpec.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ public ContextWatchWithSpec(ITestOutputHelper outputHelper)
3030
}
3131

3232
[Fact(Skip = "This test is used with Performance Profiler to check memory leaks")]
33-
public void Context_WatchWith_Should_not_have_memory_leak()
33+
public async Task Context_WatchWith_Should_not_have_memory_leak()
3434
{
3535
using (var actorSystem = ActorSystem.Create("repro"))
3636
{
3737
actorSystem.ActorOf(Props.Create<LoadHandler>());
3838

39-
Thread.Sleep(60.Seconds());
39+
await Task.Delay(60.Seconds());
4040
}
4141
}
4242

src/core/Akka.Tests/Configuration/ConfigurationSpec.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Akka.Configuration.Hocon;
1111
using System.Linq;
1212
using System.Threading;
13+
using System.Threading.Tasks;
1314
using Akka.Actor;
1415
using Akka.Configuration;
1516
using Akka.Dispatch;
@@ -86,12 +87,12 @@ public void Deserializes_hocon_configuration_from_net_config_file()
8687

8788
// unit test for bug #4330
8889
[Fact]
89-
public void Should_load_config_from_app_config_file()
90+
public async Task Should_load_config_from_app_config_file()
9091
{
9192
#if !CORECLR
9293
var system = ActorSystem.Create(Guid.NewGuid().ToString());
9394
system.Settings.Config.GetBoolean("nonsense.entry").ShouldBeTrue();
94-
system.Terminate();
95+
await system.Terminate();
9596
#else
9697
// Skip this test for Linux targets
9798
Output.WriteLine("This test is skipped.");

0 commit comments

Comments
 (0)