mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Run integration tests in parallel
Revert "Try to fix alpine integration tests"
This reverts commit d8cb86c5dd.
[common]
This commit is contained in:
@@ -1,24 +1,33 @@
|
||||
using System.Threading;
|
||||
using NLog;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Indexers.Newznab;
|
||||
using NzbDrone.Test.Common;
|
||||
using Readarr.Http.ClientSchema;
|
||||
|
||||
namespace NzbDrone.Integration.Test
|
||||
{
|
||||
[Parallelizable(ParallelScope.Fixtures)]
|
||||
public abstract class IntegrationTest : IntegrationTestBase
|
||||
{
|
||||
protected static int StaticPort = 8787;
|
||||
|
||||
protected NzbDroneRunner _runner;
|
||||
|
||||
public override string AuthorRootFolder => GetTempDirectory("AuthorRootFolder");
|
||||
|
||||
protected override string RootUrl => "http://localhost:8787/";
|
||||
protected int Port { get; private set; }
|
||||
|
||||
protected override string RootUrl => $"http://localhost:{Port}/";
|
||||
|
||||
protected override string ApiKey => _runner.ApiKey;
|
||||
|
||||
protected override void StartTestTarget()
|
||||
{
|
||||
_runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger());
|
||||
_runner.KillAll();
|
||||
Port = Interlocked.Increment(ref StaticPort);
|
||||
|
||||
_runner = new NzbDroneRunner(LogManager.GetCurrentClassLogger(), Port);
|
||||
_runner.Kill();
|
||||
|
||||
_runner.Start();
|
||||
}
|
||||
@@ -45,7 +54,7 @@ namespace NzbDrone.Integration.Test
|
||||
|
||||
protected override void StopTestTarget()
|
||||
{
|
||||
_runner.KillAll();
|
||||
_runner.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user