diff --git a/src/core/Akka.Tests/Actor/ContextWatchWithSpec.cs b/src/core/Akka.Tests/Actor/ContextWatchWithSpec.cs index 71a9a72191f..c280e57511e 100644 --- a/src/core/Akka.Tests/Actor/ContextWatchWithSpec.cs +++ b/src/core/Akka.Tests/Actor/ContextWatchWithSpec.cs @@ -30,13 +30,13 @@ public ContextWatchWithSpec(ITestOutputHelper outputHelper) } [Fact(Skip = "This test is used with Performance Profiler to check memory leaks")] - public void Context_WatchWith_Should_not_have_memory_leak() + public async Task Context_WatchWith_Should_not_have_memory_leak() { using (var actorSystem = ActorSystem.Create("repro")) { actorSystem.ActorOf(Props.Create()); - Thread.Sleep(60.Seconds()); + await Task.Delay(60.Seconds()); } } diff --git a/src/core/Akka.Tests/Configuration/ConfigurationSpec.cs b/src/core/Akka.Tests/Configuration/ConfigurationSpec.cs index 18654b6f9f9..f01e2bd8563 100644 --- a/src/core/Akka.Tests/Configuration/ConfigurationSpec.cs +++ b/src/core/Akka.Tests/Configuration/ConfigurationSpec.cs @@ -10,6 +10,7 @@ using Akka.Configuration.Hocon; using System.Linq; using System.Threading; +using System.Threading.Tasks; using Akka.Actor; using Akka.Configuration; using Akka.Dispatch; @@ -86,12 +87,12 @@ public void Deserializes_hocon_configuration_from_net_config_file() // unit test for bug #4330 [Fact] - public void Should_load_config_from_app_config_file() + public async Task Should_load_config_from_app_config_file() { #if !CORECLR var system = ActorSystem.Create(Guid.NewGuid().ToString()); system.Settings.Config.GetBoolean("nonsense.entry").ShouldBeTrue(); - system.Terminate(); + await system.Terminate(); #else // Skip this test for Linux targets Output.WriteLine("This test is skipped.");