mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
New: Watch filesystem for changes to library
This commit is contained in:
@@ -38,6 +38,28 @@ namespace NzbDrone.Common.Test.TPLTests
|
||||
counter.Count.Should().Be(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Retry(3)]
|
||||
public void should_wait_for_last_call_if_execute_resets_timer()
|
||||
{
|
||||
var counter = new Counter();
|
||||
var debounceFunction = new Debouncer(counter.Hit, TimeSpan.FromMilliseconds(200), true);
|
||||
|
||||
debounceFunction.Execute();
|
||||
|
||||
Thread.Sleep(100);
|
||||
|
||||
debounceFunction.Execute();
|
||||
|
||||
Thread.Sleep(150);
|
||||
|
||||
counter.Count.Should().Be(0);
|
||||
|
||||
Thread.Sleep(100);
|
||||
|
||||
counter.Count.Should().Be(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Retry(3)]
|
||||
public void should_throttle_calls()
|
||||
|
||||
Reference in New Issue
Block a user