aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-02-23 17:30:24 +0100
committerBond_009 <bond.009@outlook.com>2021-02-23 17:30:24 +0100
commit032d72a8a7a1c3884d07b0f3b7bd93790988d414 (patch)
treec4502d8a2de6723cdef37e2ac35246c0ed7df052 /tests
parentacac21d8dc3eb9383136ff692606dc2f65adf405 (diff)
Pls fix race condition
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cs b/tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cs
index dbbd5ac28..ab7e0b6e7 100644
--- a/tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cs
+++ b/tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Concurrent;
using System.IO;
+using System.Threading;
using Emby.Server.Implementations;
using Emby.Server.Implementations.IO;
using Jellyfin.Server;
@@ -21,7 +22,7 @@ namespace Jellyfin.Api.Tests
public class JellyfinApplicationFactory : WebApplicationFactory<Startup>
{
private static readonly string _testPathRoot = Path.Combine(Path.GetTempPath(), "jellyfin-test-data");
- private static readonly ConcurrentBag<IDisposable> _disposableComponents = new ConcurrentBag<IDisposable>();
+ private readonly ConcurrentBag<IDisposable> _disposableComponents = new ConcurrentBag<IDisposable>();
/// <summary>
/// Initializes a new instance of the <see cref="JellyfinApplicationFactory"/> class.
@@ -96,7 +97,7 @@ namespace Jellyfin.Api.Tests
var appHost = (TestAppHost)testServer.Services.GetRequiredService<IApplicationHost>();
appHost.ServiceProvider = testServer.Services;
appHost.InitializeServices().GetAwaiter().GetResult();
- appHost.RunStartupTasksAsync().GetAwaiter().GetResult();
+ appHost.RunStartupTasksAsync(CancellationToken.None).GetAwaiter().GetResult();
return testServer;
}