1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-23 22:25:56 -04:00

Fixed several tests and test infrastructure issues

This commit is contained in:
Taloth Saldono
2019-08-16 22:04:34 +02:00
parent ef6a648189
commit de31dfb11e
10 changed files with 120 additions and 58 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
@@ -126,7 +127,7 @@ namespace NzbDrone.Integration.Test
[SetUp]
public void IntegrationSetUp()
{
TempDirectory = Path.Combine(TestContext.CurrentContext.TestDirectory, "_test_" + DateTime.UtcNow.Ticks);
TempDirectory = Path.Combine(TestContext.CurrentContext.TestDirectory, "_test_" + Process.GetCurrentProcess().Id + "_" + DateTime.UtcNow.Ticks);
// Wait for things to get quiet, otherwise the previous test might influence the current one.
Commands.WaitAll();
@@ -150,6 +151,17 @@ namespace NzbDrone.Integration.Test
_signalrConnection = null;
_signalRReceived = new List<SignalRMessage>();
}
if (Directory.Exists(TempDirectory))
{
try
{
Directory.Delete(TempDirectory, true);
}
catch
{
}
}
}
public string GetTempDirectory(params string[] args)