mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 23:11:10 +00:00
Merge branch 'master' into bugfix/fixes-return-url-missing-on-redirect-to-login-page
This commit is contained in:
6 files changed
+22
-43
No files matched your search
+4
-2
@@ -449,11 +449,13 @@ public class TranscodingCacheCoordinatorTests : IDisposable
|
||||
string cacheId = CreateCacheId();
|
||||
string cachePath = Path.Combine(_cacheRoot, cacheId);
|
||||
PublishEntry(cacheId, 50, 100);
|
||||
Thread.Sleep(200);
|
||||
// The entry must be older than the grace period before the touch, and the touch must still be inside it when the reservation
|
||||
// runs. A grace period of seconds keeps the second condition true on slow CI runners, where a few hundred milliseconds can pass between the two calls.
|
||||
Thread.Sleep(2100);
|
||||
|
||||
// Act
|
||||
_sut.Touch(cacheId, TimeSpan.Zero);
|
||||
bool result = _sut.TryReserve(80, 100, TimeSpan.FromMilliseconds(100), out _);
|
||||
bool result = _sut.TryReserve(80, 100, TimeSpan.FromSeconds(2), out _);
|
||||
|
||||
// Assert
|
||||
Assert.False(result);
|
||||
|
||||
+2
-1
@@ -43,7 +43,8 @@ public class FileHashServiceTests
|
||||
shouldParallelizeReads: true,
|
||||
() =>
|
||||
{
|
||||
callbackInvocationCount++;
|
||||
// The callback is invoked concurrently by the parallel reads, so a plain increment could lose a count.
|
||||
Interlocked.Increment(ref callbackInvocationCount);
|
||||
return Task.CompletedTask;
|
||||
},
|
||||
CancellationToken.None);
|
||||
|
||||
Reference in new issue
Block a user