Skip to content

Commit

Permalink
[tests] Ignore the MessageHandlerTest.GHIssue16339 test if we're in C…
Browse files Browse the repository at this point in the history
…I and have a bad network. (xamarin#20416)

Fixes this test failure:

    MonoTests.System.Net.Http.MessageHandlerTest.GHIssue16339
    	[FAIL] GHIssue16339() :   ReasonPhrase #1
      Expected string length 2 but was 11. Strings differ at index 0.
      Expected: "OK"
      But was:  "Bad Gateway"
  • Loading branch information
rolfbjarne committed Apr 11, 2024
1 parent fa9805d commit e5a63b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/monotouch-test/System.Net.Http/MessageHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ public void GHIssue16339 ()

for (var i = 0; i < iterations; i++) {
var rsp = delegatingHandler.Responses [i];
TestRuntime.IgnoreInCIIfBadNetwork (rsp.StatusCode);
Assert.IsTrue (delegatingHandler.IsCompleted (i), $"Completed #{i}");
Assert.AreEqual ("OK", rsp.ReasonPhrase, $"ReasonPhrase #{i}");
Assert.AreEqual (HttpStatusCode.OK, rsp.StatusCode, $"StatusCode #{i}");
Expand Down

0 comments on commit e5a63b3

Please sign in to comment.