Uh oh!
There was an error while loading. Please reload this page.
Isolate DiagnosticsTest by disabling its prallelization - #116955
Conversation
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Tagging subscribers to this area: @dotnet/ncl |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
MihaZupan
commented
Jun 24, 2025
#116741 is adding |
rokonec
commented
Jun 24, 2025
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 |
rokonec
commented
Jun 24, 2025
Converting to draft for now as it seems that #116741 will address it. |
rokonec
commented
Jun 27, 2025
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.