mirror of https://github.com/lidarr/Lidarr
Fixed: Make ProcessProvider tests more reliable
This commit is contained in:
parent
add0d22e56
commit
2049034883
|
@ -72,6 +72,8 @@ namespace NzbDrone.Common.Test
|
|||
{
|
||||
var process = StartDummyProcess();
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
var check = Subject.GetProcessById(process.Id);
|
||||
check.Should().NotBeNull();
|
||||
|
||||
|
@ -90,6 +92,8 @@ namespace NzbDrone.Common.Test
|
|||
{
|
||||
var process = StartDummyProcess();
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
Subject.Exists(DummyApp.DUMMY_PROCCESS_NAME).Should()
|
||||
.BeTrue("expected one dummy process to be already running");
|
||||
|
||||
|
@ -101,6 +105,7 @@ namespace NzbDrone.Common.Test
|
|||
|
||||
|
||||
[Test]
|
||||
[Retry(3)]
|
||||
[Platform(Exclude="MacOsX")]
|
||||
[Retry(3)]
|
||||
public void kill_all_should_kill_all_process_with_name()
|
||||
|
@ -108,6 +113,8 @@ namespace NzbDrone.Common.Test
|
|||
var dummy1 = StartDummyProcess();
|
||||
var dummy2 = StartDummyProcess();
|
||||
|
||||
Thread.Sleep(500);
|
||||
|
||||
Subject.KillAll(DummyApp.DUMMY_PROCCESS_NAME);
|
||||
|
||||
dummy1.HasExited.Should().BeTrue();
|
||||
|
@ -126,7 +133,7 @@ namespace NzbDrone.Common.Test
|
|||
}
|
||||
});
|
||||
|
||||
if (!processStarted.Wait(2000))
|
||||
if (!processStarted.Wait(5000))
|
||||
{
|
||||
Assert.Fail("Failed to start process within 2 sec");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue