Repository navigation
Make ConnectWithRevocation_StapledOcsp more resilient to being slow - #70413
Conversation
|
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue DetailsOn my Linux dev box this actually speeds up the ConnectWithRevocation_StapledOcsp(false) test from a 200ms delay to a 6ms delay (combination of reflection and await), but should also make it better handle high load and the background HTTP loopback fetch taking longer than 200ms. Fixes #70322.
|
| if (offlineContext.GetValueOrDefault(false)) | ||
| { | ||
| // Add a delay just to show we're not winning because of race conditions. | ||
| await Task.Delay(200); |
There was a problem hiding this comment.
What happens if this isn't "long enough"? Will the test still be flaky or is it just potentially a false negative?
There was a problem hiding this comment.
From a white-box perspective, this delay doesn't actually do anything. Because offlineContext is true the context isn't ever going to download an OCSP payload, so we're not helping the test pass or fail by delaying.
From a black-box/future-proofing perspective, the delay adds some confidence that the test isn't just passing by being faster than the product.
The intermittent failures are associated with the parameters that hit the else (that's now powered by reflecting to grab the task to ensure that we don't race ahead).
wfurt
left a comment
There was a problem hiding this comment.
LGTM.
We can keep watching the test runs.
It is curious that all the linked failures are on systems with old OpenSSL.
On my Linux dev box this actually speeds up the ConnectWithRevocation_StapledOcsp(false) test from a 200ms delay to a 6ms delay (combination of reflection and await), but should also make it better handle high load and the background HTTP loopback fetch taking longer than 200ms.
Fixes #70322.