Skip to content

Conversation

@vcsjones
Copy link
Member

Windows 7 has been observed timing out the fetch operation slightly early. For example, 15.9 seconds instead of the expected 16 seconds. Since this is OS behavior that we can't control, the test has been changed to allow a small amount of leeway in the expected timeout.

Closes #55554

@ghost ghost added the area-System.Security label Jul 13, 2021
@ghost
Copy link

ghost commented Jul 13, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

Windows 7 has been observed timing out the fetch operation slightly early. For example, 15.9 seconds instead of the expected 16 seconds. Since this is OS behavior that we can't control, the test has been changed to allow a small amount of leeway in the expected timeout.

Closes #55554

Author: vcsjones
Assignees: -
Labels:

area-System.Security

Milestone: -

@vcsjones vcsjones changed the title Add leeway to revocation test. Add leeway to revocation test Jul 13, 2021
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does "16 seconds" come from? I see TimeSpan.FromSeconds(15) above.

Copy link
Member Author

@vcsjones vcsjones Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~The delay * 2 (delay is up on line 37). There are two certificates that we are going to check revocation for in this chain, and each one is expected to take 8 seconds since that delay is a per-certificate timeout. So in general we would expect the whole operation to take at least 16 seconds. But, as this PR is trying to address, Windows 7 appears to be timing out just a bit late.

I see. I will reword the comment since it appears I noted the wrong thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - I think I misunderstood myself what was going on here and reworded the comment and tightened the timeout.

Basically, we're doing revocation checking for two certificates. Our fake server introduces an 8 second delay for each response. So we expect the response to complete in >= 16 seconds. But the issue is that it is completing in 15.99 seconds. I suspect this is because the delays are introduced using Thread.Sleep, which I suspect is imprecise and can complete sooner than 8 seconds (maybe in 7.99 seconds).

@bartonjs bartonjs merged commit ffed50c into dotnet:main Jul 13, 2021
@vcsjones vcsjones deleted the 55554-fix branch July 13, 2021 18:38
@ghost ghost locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure:System.Security.Cryptography.X509Certificates.Tests.RevocationTests.TimeoutTests.RevocationCheckingDelayed

3 participants