forked from MihaZupan/runtime-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Triage for dotnet/runtime#117161.
Repo filter: All networking issues.
MihuBot version: a1770b.
Ping MihaZupan for any issues.
This is a test triage report generated by AI, aimed at helping the triage team quickly identify past issues/PRs that may be related.
Take any conclusions with a large grain of salt.
dotnet/runtime#117161: SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfo test failed with "Exception type was not an exact match" by jkotas
[Tool] Searching for Exception type was not an exact match, SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfo, SocketsHttpHandler_DiagnosticsTest_Http3, OperationCanceledException test failure, System.Net.Http.Functional.Tests (IncludeOpen=True, IncludeClosed=True, IncludeIssues=True, IncludePullRequests=True, Repository=dotnet/runtime)
[Tool] Found 177 issues, 66 comments, 177 returned results (11562 ms)
Here are the most relevant related issues and discussions for issue #117161 ("SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfo test failed with 'Exception type was not an exact match'"):
1. Issue #116279 (June 2025) - System.Net.Http.Functional.Tests: Exception type was not an exact match
- Summary: This issue tracks a series of failures in various System.Net.Http.Functional.Tests, including
SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfo, with the error "Exception type was not an exact match". The failures are related to the use ofAssert.Throws()in tests, where the actual exception type does not exactly match the expected type (e.g.,TaskCanceledExceptionvs.EqualException). - Key comments:
- The failures are associated with the
ActivityRecorderand diagnostic tracing in HTTP tests. - [antonfirsov] notes that the error message matches different issues, but the specific failure in #116279 should be fixed by PR #116741.
- [jkotas] observes that while the failures occur in different tests, they all relate to
ActivityRecorder. - The issue was closed on June 24, 2025, after the fix was merged.
- The failures are associated with the
- Relevance: The current issue (#117161) is explicitly called out as "More of #116279" by the author, indicating it is a recurrence or continuation of the same root cause.
2. Issue #117161 (June 2025) - SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfo test failed with "Exception type was not an exact match"
- Summary: The current issue being triaged. The test
System.Net.Http.Functional.Tests.SocketsHttpHandler_DiagnosticsTest_Http3.SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfofailed with "Exception type was not an exact match". The log shows thatAssert.Throws()expected aTaskCanceledExceptionbut got anEqualExceptioninstead. - Key comments:
- [jkotas] provides a detailed log snippet showing the mismatch between expected and actual exception types.
- [jkotas] also comments: "More of #116279. cc @antonfirsov", directly linking this failure to the previous issue.
- Relevance: This is a direct recurrence of the pattern seen in #116279.
3. Issue #116205 (June 2025) - OperationCanceledException not captured with HTTP native instrumentation
- Summary: This issue discusses why
OperationCanceledExceptionis not reported as an error with native HTTP instrumentation, while it is with OpenTelemetry.Instrumentation.Http. The root cause is traced to the wayDiagnosticsHandlerhandles cancellation. - Relevance: While not a test failure, this issue is related to the handling and reporting of
OperationCanceledExceptionin HTTP diagnostics, which is the underlying theme of the test failures in #117161 and #116279.
4. PR #116269 (June 2025) - Record OperationCanceledException in HttpClient native instrumentation
- Summary: This PR fixes #116205 by ensuring that when an
OperationCanceledExceptionoccurs, the activity status and error tags are set appropriately in native HTTP instrumentation. - Relevance: This PR addresses the root cause of the diagnostic mismatch for cancellation exceptions, which is likely related to the test failures in #117161 and #116279.
5. Issue #104699 (July 2024) - HTTP/3 Test Failure: SocketsHttpHandler_DiagnosticsTest_Http3.SendAsync_ExpectedDiagnosticCancelledLogging
- Summary: This issue reports a similar test failure in HTTP/3 diagnostics tests, where
Assert.Throws()expected a specific exception type but got a different one (NullReferenceExceptioninstead ofQuicException). - Relevance: Demonstrates a pattern of test fragility around exception type matching in HTTP/3 diagnostics tests.
6. Issue #25110 (Feb 2018) - SocketsHttpHandler cancellation test failures on windows
- Summary: Older issue tracking cancellation-related test failures in SocketsHttpHandler, with mismatches in expected vs. actual exception types and timing.
- Relevance: Shows a long-standing pattern of cancellation-related test fragility in System.Net.Http.
Conclusions
- Root cause: The failures in #117161 are a recurrence of the pattern seen in #116279, where the test expects an exact exception type match, but the actual exception thrown is different (often due to how diagnostics and activity recording interact with cancellation).
- Recent fixes: PR #116741 and PR #116269 address related issues in HTTP diagnostics and cancellation handling.
- Ongoing fragility: There is a history of similar issues in HTTP diagnostics and cancellation tests, especially with HTTP/3 and activity recording.
Recommendations
- If triaging: Mark #117161 as a duplicate or continuation of #116279, referencing the recent fixes and the ongoing investigation into diagnostics/cancellation test fragility.
- If investigating further: Review the changes in PR #116741 and PR #116269 to ensure they are applied to all relevant tests, and consider relaxing strict exception type matching in tests where diagnostic instrumentation may alter the exception flow.
References:
- #116279 - System.Net.Http.Functional.Tests: Exception type was not an exact match
- #116205 - OperationCanceledException not captured with HTTP native instrumentation
- #117161 - SendAsync_OperationCanceledException_RecordsActivitiesWithCorrectErrorInfo test failed with "Exception type was not an exact match"
- #104699 - HTTP/3 Test Failure: SocketsHttpHandler_DiagnosticsTest_Http3.SendAsync_ExpectedDiagnosticCancelledLogging
- #25110 - SocketsHttpHandler cancellation test failures on windows
- PR #116269 - Record OperationCanceledException in HttpClient native instrumentation
- PR #116741 - (fix for #116279, referenced in comments)
Let me know if you need a more detailed summary of any specific issue or PR!
Metadata
Metadata
Assignees
Labels
No labels