[tests] Mark ProxyTest as Inconclusive on network failure#11288
Open
jonathanpeppers wants to merge 2 commits intomainfrom
Open
[tests] Mark ProxyTest as Inconclusive on network failure#11288jonathanpeppers wants to merge 2 commits intomainfrom
jonathanpeppers wants to merge 2 commits intomainfrom
Conversation
…work failure Catch WebException for ConnectFailure, NameResolutionFailure, and Timeout and call Assert.Inconclusive() instead of failing. This matches the pattern used in SslTest and other network-dependent tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts a flaky Mono.Android-Tests network test so transient connectivity problems on the test machine no longer fail the suite outright. It targets System.Net test stability rather than product/runtime behavior.
Changes:
- Wraps
ProxyTest.QuoteInvalidQuoteUrlsShouldWork()in atry/catch. - Treats
ConnectFailure,NameResolutionFailure, andTimeoutWebExceptions as non-failures. - Reports those transient failures via an NUnit non-passing result instead of a hard test failure.
…ttern All other network failure handlers in this test suite use Assert.Ignore. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mark
ProxyTest.QuoteInvalidQuoteUrlsShouldWorkasAssert.Inconclusive()on network failure instead of failing the test. This matches the existing pattern used inSslTestand other network-dependent tests.Problem
The test fails when DNS resolution is unavailable on the test machine:
Fix
Wrap the test body in a
try/catchthat catchesWebExceptionwithConnectFailure,NameResolutionFailure, orTimeoutstatus and callsAssert.Inconclusive().