mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
@@ -26,7 +26,6 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
_cachedString.Get("Test", _worker.GetString);
|
||||
|
||||
_worker.HitCount.Should().Be(1);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -38,7 +37,6 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
first.Should().Be(second);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_be_able_to_update_key()
|
||||
{
|
||||
@@ -48,7 +46,6 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
_cachedString.Find("Key").Should().Be("New");
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_be_able_to_remove_key()
|
||||
{
|
||||
@@ -70,7 +67,6 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
{
|
||||
int hitCount = 0;
|
||||
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
_cachedString.Get("key", () =>
|
||||
@@ -84,7 +80,7 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Platform(Exclude="MacOsX")]
|
||||
[Platform(Exclude = "MacOsX")]
|
||||
public void should_honor_ttl()
|
||||
{
|
||||
int hitCount = 0;
|
||||
@@ -92,11 +88,13 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
_cachedString.Get("key", () =>
|
||||
{
|
||||
hitCount++;
|
||||
return null;
|
||||
}, TimeSpan.FromMilliseconds(300));
|
||||
_cachedString.Get("key",
|
||||
() =>
|
||||
{
|
||||
hitCount++;
|
||||
return null;
|
||||
},
|
||||
TimeSpan.FromMilliseconds(300));
|
||||
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
@@ -106,7 +104,7 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
|
||||
[Test]
|
||||
[Retry(3)]
|
||||
[Platform(Exclude="MacOsX")]
|
||||
[Platform(Exclude = "MacOsX")]
|
||||
public void should_clear_expired_when_they_expire()
|
||||
{
|
||||
int hitCount = 0;
|
||||
@@ -114,11 +112,13 @@ namespace NzbDrone.Common.Test.CacheTests
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
_cachedString.Get("key", () =>
|
||||
{
|
||||
hitCount++;
|
||||
return null;
|
||||
}, TimeSpan.FromMilliseconds(300));
|
||||
_cachedString.Get("key",
|
||||
() =>
|
||||
{
|
||||
hitCount++;
|
||||
return null;
|
||||
},
|
||||
TimeSpan.FromMilliseconds(300));
|
||||
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user