From 2fa3873503b3d039e6b72cb975e2435325c820d7 Mon Sep 17 00:00:00 2001
From: Taloth Saldono <Taloth@users.noreply.github.com>
Date: Sun, 3 Apr 2016 23:31:42 +0200
Subject: [PATCH] Give a couple of timing-based tests a bit more breathing
 room.

---
 src/NzbDrone.Common.Test/TPLTests/DebouncerFixture.cs        | 4 ++++
 src/NzbDrone.Common.Test/TPLTests/RateLimitServiceFixture.cs | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/NzbDrone.Common.Test/TPLTests/DebouncerFixture.cs b/src/NzbDrone.Common.Test/TPLTests/DebouncerFixture.cs
index 960da5fd6..29e7bb7ec 100644
--- a/src/NzbDrone.Common.Test/TPLTests/DebouncerFixture.cs
+++ b/src/NzbDrone.Common.Test/TPLTests/DebouncerFixture.cs
@@ -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();
diff --git a/src/NzbDrone.Common.Test/TPLTests/RateLimitServiceFixture.cs b/src/NzbDrone.Common.Test/TPLTests/RateLimitServiceFixture.cs
index 2bd123997..cee6e11dc 100644
--- a/src/NzbDrone.Common.Test/TPLTests/RateLimitServiceFixture.cs
+++ b/src/NzbDrone.Common.Test/TPLTests/RateLimitServiceFixture.cs
@@ -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]