diff --git a/src/NzbDrone.Common.Test/ProcessProviderTests.cs b/src/NzbDrone.Common.Test/ProcessProviderTests.cs index 40270c198..2587d86ad 100644 --- a/src/NzbDrone.Common.Test/ProcessProviderTests.cs +++ b/src/NzbDrone.Common.Test/ProcessProviderTests.cs @@ -66,10 +66,13 @@ public void GetProcessById_should_return_null_for_invalid_process(int processId) } [Test] + [Retry(3)] public void should_be_able_to_start_process() { var process = StartDummyProcess(); + Thread.Sleep(500); + var check = Subject.GetProcessById(process.Id); check.Should().NotBeNull(); @@ -88,6 +91,8 @@ public void exists_should_find_running_process() { var process = StartDummyProcess(); + Thread.Sleep(500); + Subject.Exists(DummyApp.DUMMY_PROCCESS_NAME).Should() .BeTrue("expected one dummy process to be already running"); @@ -147,12 +152,15 @@ public void Should_be_able_to_start_python() } [Test] + [Retry(3)] [Platform(Exclude="MacOsX")] public void kill_all_should_kill_all_process_with_name() { var dummy1 = StartDummyProcess(); var dummy2 = StartDummyProcess(); + Thread.Sleep(500); + Subject.KillAll(DummyApp.DUMMY_PROCCESS_NAME); dummy1.HasExited.Should().BeTrue(); @@ -181,7 +189,7 @@ private Process StartDummyProcess() } }); - if (!processStarted.Wait(2000)) + if (!processStarted.Wait(5000)) { Assert.Fail("Failed to start process within 2 sec"); }