Enable MaxConnectionsPerServer_WaitingConnectionsAreCancelable again (dotnet/corefx...
authorTomas Weinfurt <tweinfurt@yahoo.com>
Thu, 30 May 2019 02:33:18 +0000 (19:33 -0700)
committerGitHub <noreply@github.com>
Thu, 30 May 2019 02:33:18 +0000 (19:33 -0700)
* enable MaxConnectionsPerServer_WaitingConnectionsAreCancelable afain

* skip with curl handler

Commit migrated from https://github.com/dotnet/corefx/commit/c6fc43c6f2b92d8e13a444217f29368159e015eb

src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs

index cd03b96..ad83432 100644 (file)
@@ -9,6 +9,9 @@ using System.IO;
 using System.Net.Test.Common;
 using System.Threading;
 using System.Threading.Tasks;
+
+using Microsoft.DotNet.XUnitExtensions;
+
 using Xunit;
 using Xunit.Abstractions;
 
@@ -292,16 +295,16 @@ namespace System.Net.Http.Functional.Tests
             }
         }
 
-        [ActiveIssue(32000)]
         [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT stack can't set MaxConnectionsPerServer < 2")]
-        [Fact]
+        [ConditionalFact]
         public async Task MaxConnectionsPerServer_WaitingConnectionsAreCancelable()
         {
-            if (IsNetfxHandler)
+            if (IsNetfxHandler || IsCurlHandler)
             {
                 // Throws HttpRequestException wrapping a WebException for the canceled request
                 // instead of throwing an OperationCanceledException or a canceled WebException directly.
-                return;
+                // With CurlHandler, this test sometimes hangs.
+                throw new SkipTestException("Skipping on unstable platform handler");
             }
 
             using (HttpClientHandler handler = CreateHttpClientHandler())