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

increase FailingTestTimeoutMiliseconds for Ssl server tests. #36101

Merged
merged 4 commits into from
May 9, 2020

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented May 8, 2020

After looking at recent failure of ServerAsyncAuthenticate_MismatchProtocols_Fails I noticed that the test failed with timeout after ~1s. With the expectation of TLS alert, we need to receive Hello, process it, send response, read it from socket, give it to OS and then throw.
All the failures were on debug builds and existing 250ms seems pretty short.
I could not reproduce the failure locally and proposed 3s is just a guess for upper limit.
(test will finish faster if expected failure happen faster)
The value is only used by ServerAsyncSslHelper() and tests using it.

fixes #29642 (another attempt)

@wfurt wfurt added area-System.Net.Security test-enhancement Improvements of test source code labels May 8, 2020
@wfurt wfurt added this to the 5.0 milestone May 8, 2020
@wfurt wfurt requested a review from a team May 8, 2020 05:26
@wfurt wfurt self-assigned this May 8, 2020
@ghost
Copy link

ghost commented May 8, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@wfurt
Copy link
Member Author

wfurt commented May 8, 2020

I also updated the ITestOutputHelper so we get

       Condition(s) not met: "CipherSuitesPolicyAndTls13Supported"
      System.Net.Security.Tests.ServerAsyncAuthenticateTest.ServerAsyncAuthenticate_MismatchProtocols_Fails(serverProtocol: Tls12, clientProtocol: Tls11, expectedException: typeof(System.Security.Authentication.AuthenticationException)) [FAIL]
        Assert.IsAssignableFrom() Failure
        Expected: typeof(System.Security.Authentication.AuthenticationException)
        Actual:   typeof(System.TimeoutException)
        Stack Trace:
          /Users/furt/github/wfurt-runtime2/src/libraries/System.Net.Security/tests/FunctionalTests/ServerAsyncAuthenticateTest.cs(62,0): at System.Net.Security.Tests.ServerAsyncAuthenticateTest.ServerAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols serverProtocol, SslProtocols clientProtocol, Type expectedException)
          --- End of stack trace from previous location ---
        Output:
          Server: Tls11; Client: Tls12 expectedToFail: True
          Client exception: System.TimeoutException: Task timed out after 00:00:00.0010000
             at System.Threading.Tasks.TaskTimeoutExtensions.TimeoutAfter(Task task, TimeSpan timeout) in /Users/furt/github/wfurt-runtime2/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 42
             at System.Net.Security.Tests.ServerAsyncAuthenticateTest.ServerAsyncSslHelper(SslProtocols clientSslProtocols, SslProtocols serverSslProtocols, Boolean expectedToFail) in /Users/furt/github/wfurt-runtime2/src/libraries/System.Net.Security/tests/FunctionalTests/ServerAsyncAuthenticateTest.cs:line 152
    Finished:    System.Net.Security.Tests
  === TEST EXECUTION SUMMARY ===
     System.Net.Security.Tests  Total: 4308, Errors: 0, Failed: 1, Skipped: 13, Time: 18.208s

instead of

        Condition(s) not met: "CipherSuitesPolicyAndTls13Supported"
      System.Net.Security.Tests.ServerAsyncAuthenticateTest.ServerAsyncAuthenticate_MismatchProtocols_Fails(serverProtocol: Tls12, clientProtocol: Tls, expectedException: typeof(System.Security.Authentication.AuthenticationException)) [FAIL]
        Assert.IsAssignableFrom() Failure
        Expected: typeof(System.Security.Authentication.AuthenticationException)
        Actual:   typeof(System.TimeoutException)
        Stack Trace:
          /Users/furt/github/wfurt-runtime2/src/libraries/System.Net.Security/tests/FunctionalTests/ServerAsyncAuthenticateTest.cs(62,0): at System.Net.Security.Tests.ServerAsyncAuthenticateTest.ServerAsyncAuthenticate_MismatchProtocols_Fails(SslProtocols serverProtocol, SslProtocols clientProtocol, Type expectedException)
          --- End of stack trace from previous location ---
    Finished:    System.Net.Security.Tests
  === TEST EXECUTION SUMMARY ===
     System.Net.Security.Tests  Total: 4308, Errors: 0, Failed: 1, Skipped: 13, Time: 18.298s

and the output is written to testResults.xml so we can retrieve from Azure Pipeline as well.

@safern
Copy link
Member

safern commented May 8, 2020

It would be nice to get this in today since it is reproing in PRs and Rolling builds.

@stephentoub stephentoub merged commit 8b02df8 into dotnet:master May 9, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Security test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ServerAsyncAuthenticateTest.ServerAsyncAuthenticate_MismatchProtocols_Fails test failure
4 participants