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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user