aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-25 18:36:09 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-25 18:36:09 -0400
commit7e467f9faa18168ddff0607751f3929e4e3e0285 (patch)
tree58ebbc04e7561b7131babf41a565f2f27d9d5918
parent713f8b2f4b8d446a98dfcba1987b5cefd9aa21ec (diff)
Use the correct method to synchronously wait for tasks to complete
-rw-r--r--tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs b/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs
index 09821d728..5300d3661 100644
--- a/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs
+++ b/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs
@@ -65,7 +65,7 @@ namespace MediaBrowser.Api.Tests
// Create the logging config file
// TODO: We shouldn't need to do this since we are only logging to console
- Program.InitLoggingConfigFile(appPaths).Wait();
+ Program.InitLoggingConfigFile(appPaths).GetAwaiter().GetResult();
// Create a copy of the application configuration to use for startup
var startupConfig = Program.CreateAppConfiguration(commandLineOpts, appPaths);
@@ -95,8 +95,8 @@ namespace MediaBrowser.Api.Tests
// Finish initializing the app host
var appHost = (CoreAppHost)testServer.Services.GetRequiredService<IApplicationHost>();
appHost.ServiceProvider = testServer.Services;
- appHost.InitializeServices().Wait();
- appHost.RunStartupTasksAsync().Wait();
+ appHost.InitializeServices().GetAwaiter().GetResult();
+ appHost.RunStartupTasksAsync().GetAwaiter().GetResult();
return testServer;
}