Skip to content

System.Net.*.Tests are unstable or slow/long-running on a S.P.CoreLib checked runtime #131

Description

@safern

We're disabling some System.Net.*.Tests assemblies when running on a checked runtime in: #261. However we should investigate what can we do to enable these tests there.

I.e System.Net.Sockets.Tests would be a really would candidate for runtime testing and stress testing.

cc: @BruceForstall @jkotas @stephentoub

Activity

  1. changed the title [-]System.Net.*.Tests are inestable or slow/long-running on a S.P.CoreLib checked runtime[/-] [+]System.Net.*.Tests are unstable or slow/long-running on a S.P.CoreLib checked runtime[/+] on Nov 19, 2019
  2. davidsh commented on Nov 20, 2019

    @davidsh
    Contributor
  3. ViktorHofer commented on Nov 20, 2019

    @ViktorHofer
    Member

    Do we know why especially the networking tests are so slow on a checked runtime?

  4. davidsh commented on Nov 20, 2019

    @davidsh
    Contributor

    What is a "checked" runtime? I know what Debug vs. Release is. How does "checked" related to that?

  5. BruceForstall commented on Nov 20, 2019

    @BruceForstall
    Contributor

    Checked is the same as Debug (e.g., asserts enabled), but with the C++ compiler optimization enabled (so native code runs much faster).

  6. wfurt commented on Nov 20, 2019

    @wfurt
    Member

    It would be great to get more specific instructions how to know produce one and to know if test run is checked. I always assumed that checked would be slower than Debug but it seems like it may not.
    Lot of networking code (product & tests) depends on timing. That is different from let say data structure tests. There are some constants for test and AFAIK we already adjusted some for ARM runs. We could possibly do that for checked builds if needed. But first we need to be able to reproduce it local and take a look.

  7. karelz commented on Jan 7, 2020

    @karelz
    Member

    Any update on this? @BruceForstall @ViktorHofer @safern

  8. safern commented on Jan 16, 2020

    @safern
    MemberAuthor

    Here is a Checked run, where this tests had to be killed because they were long running:

    https://helix.dot.net/api/2019-06-17/jobs/70eeb0e3-b877-4b51-a91b-2b5d8a69f8a8/workitems/System.Net.Mail.Functional.Tests/console

  9. 2 remaining items

  10. added
    disabled-testThe test is disabled in source code against the issue
    test-bugProblem in test source code (most likely)
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Feb 19, 2020
  11. added this to the 5.0 milestone on Feb 19, 2020
  12. modified the milestones: 5.0, Future on May 7, 2020
  13. added a commit that references this issue on Oct 12, 2020
  14. dotnet-policy-service commented on Nov 6, 2024

    @dotnet-policy-service
    Contributor

    Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

    This process is part of our issue cleanup automation.

  15. MihaZupan commented on May 3, 2025

    @MihaZupan
    Member

    Seeing the same timeout failure despite the test being disabled on non-release runtimes
    https://helixr1107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-115234-merge-60c0a58a5d5d44bf9e/System.Net.Mail.Functional.Tests/1/console.f4ccdd97.log?helixlogtype=result

    [Fact]
    [PlatformSpecific(TestPlatforms.Windows)] // NTLM support required, see https://github.com/dotnet/runtime/issues/25827
    [SkipOnCoreClr("System.Net.Tests are flaky and/or long running: https://github.com/dotnet/runtime/issues/131", ~RuntimeConfiguration.Release)]
    [ActiveIssue("https://github.com/dotnet/runtime/issues/131", TestRuntimes.Mono)] // System.Net.Tests are flaky and/or long running
    public async Task TestCredentialsCopyInAsyncContext()

    System.Net.Mail.Functional.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
      Discovering: System.Net.Mail.Functional.Tests (method display = ClassAndMethod, method display options = None)
      Discovered:  System.Net.Mail.Functional.Tests (found 226 test cases)
      Starting:    System.Net.Mail.Functional.Tests (parallel test collections = on [2 threads], stop on fail = off)
       System.Net.Mail.Functional.Tests: [Long Running Test] 'System.Net.Mail.Tests.SmtpClientAuthTest_SendMailAsync.TestCredentialsCopyInAsyncContext', Elapsed: 00:03:20
       System.Net.Mail.Functional.Tests: [Long Running Test] 'System.Net.Mail.Tests.SmtpClientAuthTest_SendMailAsync.TestCredentialsCopyInAsyncContext', Elapsed: 00:05:20
       System.Net.Mail.Functional.Tests: [Long Running Test] 'System.Net.Mail.Tests.SmtpClientAuthTest_SendMailAsync.TestCredentialsCopyInAsyncContext', Elapsed: 00:07:20
       System.Net.Mail.Functional.Tests: [Long Running Test] 'System.Net.Mail.Tests.SmtpClientAuthTest_SendMailAsync.TestCredentialsCopyInAsyncContext', Elapsed: 00:09:20
       System.Net.Mail.Functional.Tests: [Long Running Test] 'System.Net.Mail.Tests.SmtpClientAuthTest_SendMailAsync.TestCredentialsCopyInAsyncContext', Elapsed: 00:11:20
       System.Net.Mail.Functional.Tests: [Long Running Test] 'System.Net.Mail.Tests.SmtpClientAuthTest_SendMailAsync.TestCredentialsCopyInAsyncContext', Elapsed: 00:13:20
    
    ...
    [EXECUTION TIMED OUT]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.Socketsdisabled-testThe test is disabled in source code against the issuetest-bugProblem in test source code (most likely)test-run-coreTest failures in .NET Core test runs

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions