New: Watch filesystem for changes to library

This commit is contained in:
ta264
2020-02-27 21:27:03 +00:00
parent 8e4e62c17a
commit cf15359b89
12 changed files with 406 additions and 17 deletions
@@ -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()