-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Isolate DiagnosticsTest by disabling its prallelization #116955
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Isolate DiagnosticsTest by disabling test parallelization to prevent intermittent hangs caused by shared telemetry configuration.
- Added
[Collection(nameof(DisableParallelization))]attribute to theDiagnosticsTestbase class. - Introduced
using Xunit.Sdk;import.
src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs
Outdated
Show resolved
Hide resolved
|
Tagging subscribers to this area: @dotnet/ncl |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
#116741 is adding |
I am trying to repro it with that PR branch. I found three tests which might be causing is, that PR address only one, and even if other are not causing it by its internal implementation, leaving it as is would make it too fragile for future changes. Diagnostic tests seems to properly cleanup after each run, which makes me believe we can achieve proper isolation by disabling concurrent running. I prefer this to |
|
Converting to draft for now as it seems that #116741 will address it. |
|
Seems to be solved by other PR |
Fixing: System.Net.Http.Functional.Tests timeouts #115683
Context
Functional tests were starting to intermittently hang.
After analyzing I found that just-running diagnostics tests are causing inserting
ActivityRecordertest listener which is failing on some verification byAssert.Same. Some of our test expect that sending request by client part of the client <-> server communication will always succeed and hang on server part accepting incoming request.Changes made
Since Diagnostics tests use process wide telemetry configuration, which is reverted after test runs, I decided to isolate diagnostic tests which leverage
ActivityRecorderfrom other tests by applying[Collection(nameof(DisableParallelization))]to do its job.Testing
I was able to consistently reproduce this error by running tests in loop. After changes I am no longer able to repro it.
Note
I noticed that after this changes previously detected intermittent test failures also disappeared.