mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-19 10:54:05 +02:00
Give a couple of timing-based tests a bit more breathing room.
This commit is contained in:
parent
96b7bd3b2b
commit
2fa3873503
@ -21,6 +21,7 @@ namespace NzbDrone.Common.Test.TPLTests
|
|||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Retry(3)]
|
||||||
public void should_hold_the_call_for_debounce_duration()
|
public void should_hold_the_call_for_debounce_duration()
|
||||||
{
|
{
|
||||||
var counter = new Counter();
|
var counter = new Counter();
|
||||||
@ -40,6 +41,7 @@ namespace NzbDrone.Common.Test.TPLTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Retry(3)]
|
||||||
public void should_throttle_calls()
|
public void should_throttle_calls()
|
||||||
{
|
{
|
||||||
var counter = new Counter();
|
var counter = new Counter();
|
||||||
@ -65,6 +67,7 @@ namespace NzbDrone.Common.Test.TPLTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Retry(3)]
|
||||||
public void should_hold_the_call_while_paused()
|
public void should_hold_the_call_while_paused()
|
||||||
{
|
{
|
||||||
var counter = new Counter();
|
var counter = new Counter();
|
||||||
@ -98,6 +101,7 @@ namespace NzbDrone.Common.Test.TPLTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Retry(3)]
|
||||||
public void should_handle_pause_reentrancy()
|
public void should_handle_pause_reentrancy()
|
||||||
{
|
{
|
||||||
var counter = new Counter();
|
var counter = new Counter();
|
||||||
|
@ -62,6 +62,7 @@ namespace NzbDrone.Common.Test.TPLTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Retry(3)]
|
||||||
public void should_wait_for_existing()
|
public void should_wait_for_existing()
|
||||||
{
|
{
|
||||||
GivenExisting("me", _epoch + TimeSpan.FromMilliseconds(200));
|
GivenExisting("me", _epoch + TimeSpan.FromMilliseconds(200));
|
||||||
@ -70,7 +71,7 @@ namespace NzbDrone.Common.Test.TPLTests
|
|||||||
Subject.WaitAndPulse("me", TimeSpan.FromMilliseconds(400));
|
Subject.WaitAndPulse("me", TimeSpan.FromMilliseconds(400));
|
||||||
watch.Stop();
|
watch.Stop();
|
||||||
|
|
||||||
watch.ElapsedMilliseconds.Should().BeInRange(195, 250);
|
watch.ElapsedMilliseconds.Should().BeInRange(175, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user