Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CancelOnTimerWithLargeRetryDelay test flakiness due to Stopwatch imprecision #384

Conversation

gobradovic
Copy link
Contributor

@gobradovic gobradovic commented Sep 5, 2024

Port of following PR: #381

CancelOnTimerWithLargeRetryDelay fails on some environments due
to the fact that Stopwatch class may report incorrect timing results on
different processors, as noted in official documentation:
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch?view=net-8.0

Internal ADO work item: https://dev.azure.com/msazure/One/_workitems/edit/29276368

…imprecision (#381)

CancelOnTimerWithLargeRetryDelay fails on some environments due to the
fact that Stopwatch class may report incorrect timing results on
different processors, as noted in official documentation:
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.stopwatch?view=net-8.0

Add error margin to account for Stopwatch imprecision

Apply the fix to the CancelOnTimer test as well
@gobradovic gobradovic requested a review from olegsych September 5, 2024 21:17
@gobradovic gobradovic merged commit 2073037 into develop Sep 6, 2024
2 checks passed
@gobradovic gobradovic deleted the user/gobradovic/fixStopwatchBugInCancelOnTimerWithLargeRetryDelayTest branch September 6, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants