Fixes the flaky callback count assertion in the parallel FileHashService test

This commit is contained in:
BinaryAlley committed 2026-11-01 09:35:38 +02:00
1 parent c44aa80fbd
commit ebef8f4cae
1 file changed
+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);