You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If code creates a CancellationTokenSource with an infinite delay, when that code is invoked with FakeTimeProvider instead of TimeProvider.System an ArgumentOutOfRangeException is thrown.
Reproduction Steps
Execute the following xunit test targeting net8.0:
Digging into the code, I think this is actually an issue in dotnet/runtime caused by the cast to uint in this method. Just verifying and if so will open a new issue there and close this one.
Description
If code creates a
CancellationTokenSource
with an infinite delay, when that code is invoked withFakeTimeProvider
instead ofTimeProvider.System
anArgumentOutOfRangeException
is thrown.Reproduction Steps
Execute the following xunit test targeting
net8.0
:Expected behavior
Both tests pass.
Actual behavior
The test using
FakeTimeProvider
fails with the following exception:Regression?
No.
Known Workarounds
None.
Configuration
8.0.100-preview.5.23303.2
8.0.0-preview.5.23308.3
Other information
No response
The text was updated successfully, but these errors were encountered: