Give a couple of timing-based tests a bit more breathing room.

pull/4/head
Taloth Saldono 9 years ago
parent 96b7bd3b2b
commit 2fa3873503

@ -21,6 +21,7 @@ namespace NzbDrone.Common.Test.TPLTests
[Test]
[Retry(3)]
public void should_hold_the_call_for_debounce_duration()
{
var counter = new Counter();
@ -40,6 +41,7 @@ namespace NzbDrone.Common.Test.TPLTests
}
[Test]
[Retry(3)]
public void should_throttle_calls()
{
var counter = new Counter();
@ -65,6 +67,7 @@ namespace NzbDrone.Common.Test.TPLTests
}
[Test]
[Retry(3)]
public void should_hold_the_call_while_paused()
{
var counter = new Counter();
@ -98,6 +101,7 @@ namespace NzbDrone.Common.Test.TPLTests
}
[Test]
[Retry(3)]
public void should_handle_pause_reentrancy()
{
var counter = new Counter();

@ -62,6 +62,7 @@ namespace NzbDrone.Common.Test.TPLTests
}
[Test]
[Retry(3)]
public void should_wait_for_existing()
{
GivenExisting("me", _epoch + TimeSpan.FromMilliseconds(200));
@ -70,7 +71,7 @@ namespace NzbDrone.Common.Test.TPLTests
Subject.WaitAndPulse("me", TimeSpan.FromMilliseconds(400));
watch.Stop();
watch.ElapsedMilliseconds.Should().BeInRange(195, 250);
watch.ElapsedMilliseconds.Should().BeInRange(175, 250);
}
[Test]

Loading…
Cancel
Save