Skip to content

Commit

Permalink
Apply the fix to the CancelOnTimer test as well
Browse files Browse the repository at this point in the history
  • Loading branch information
gobradovic committed Sep 4, 2024
1 parent 1b6bd3a commit dd770b7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public async Task CancelOnTimer()
retryDelay);
sw.Stop();

sw.ElapsedMilliseconds.Should().BeGreaterThan((long)clientRetryTimeout.TotalMilliseconds, "Should be longer than the ClientRetryTimeout.");
sw.ElapsedMilliseconds.Should().BeGreaterThan((long)clientRetryTimeout.TotalMilliseconds - StopwatchPrecisionMs, "Should be longer than the ClientRetryTimeout.");
result.ExceptionFromInvoke.Should().BeAssignableTo(typeof(OperationCanceledException), $"Should indicate a canceled operation. {result.ExceptionFromInvoke}");
result.CallCount.Should().BeLessThan(retryCount, "Should cancel before token is signaled.");
result.CancellationTokenSource.Token.IsCancellationRequested.Should().Be(false, "Cancellation should have occured due to the timer.");
Expand Down

0 comments on commit dd770b7

Please sign in to comment.