From f1a530cbc59fb52ba705de8209d031c2b4a873cb Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Tue, 16 May 2023 12:15:02 +0000 Subject: [PATCH 1/2] Active issue. --- .../Common/tests/System/Net/Http/HttpClientHandlerTest.cs | 3 +++ .../tests/FunctionalTests/HttpClientHandlerTest.Url.cs | 1 + .../System.Net.Http/tests/FunctionalTests/HttpContentTest.cs | 2 ++ .../tests/FunctionalTests/HttpRequestMessageTest.cs | 1 + 4 files changed, 7 insertions(+) diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index d03d69dd09f54..73cdc8ca0b3ac 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -276,6 +276,7 @@ where PlatformDetection.IsNotBrowser || !useSsl [ConditionalTheory] [MemberData(nameof(SecureAndNonSecure_IPBasedUri_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetAsync_SecureAndNonSecureIPBasedUri_CorrectlyFormatted(IPAddress address, bool useSsl) { if (LoopbackServerFactory.Version >= HttpVersion20.Value) @@ -410,6 +411,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task PostAsync_ManyDifferentRequestHeaders_SentCorrectly() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -1369,6 +1371,7 @@ await server.AcceptConnectionAsync(async connection => } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStreamAsync_Cancellation() { var tcs = new TaskCompletionSource(); diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Url.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Url.cs index b180fbb8aa030..380ebf7c1702e 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Url.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Url.cs @@ -21,6 +21,7 @@ public HttpClientHandlerTest_Url(ITestOutputHelper output) : base(output) { } [InlineData("/test ", "/test")] [InlineData("/test%20?a=1", "/test%20?a=1")] [InlineData("/test ?a=1", "/test%20?a=1")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task TrimmingTrailingWhiteSpace(string requestPath, string expectedServerPath) { string serverPath = null; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs index b2fc9b73e4d94..fbf7594495931 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs @@ -639,6 +639,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts() { await LoopbackServer.CreateClientAndServerAsync( @@ -733,6 +734,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled_AlreadyCanceledCts() { await LoopbackServer.CreateClientAndServerAsync( diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs index 5b936425da168..8c4ea2aa1a6e7 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs @@ -238,6 +238,7 @@ public void ToString_DefaultAndNonDefaultInstance_DumpAllFields() [InlineData("DELETE")] [InlineData("OPTIONS")] [InlineData("HEAD")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86317", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task HttpRequest_BodylessMethod_NoContentLength(string method) { using (HttpClient client = CreateHttpClient()) From 3a3a67393a5936575ae24bd2a866138d91155079 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Tue, 16 May 2023 14:13:25 +0000 Subject: [PATCH 2/2] Disable failures uncovered when timeouts are gone. --- .../tests/System/Net/Http/HttpClientHandlerTest.cs | 6 ++++++ .../FunctionalTests/HttpClientHandlerTest.Headers.cs | 10 ++++++++++ .../tests/FunctionalTests/HttpClientTest.cs | 7 +++++++ .../tests/FunctionalTests/HttpContentTest.cs | 6 ++++++ .../tests/FunctionalTests/HttpRequestMessageTest.cs | 1 + 5 files changed, 30 insertions(+) diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index 73cdc8ca0b3ac..c042e993ecc48 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -185,6 +185,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( [ConditionalTheory] [MemberData(nameof(GetAsync_IPBasedUri_Success_MemberData))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetAsync_IPBasedUri_Success(IPAddress address) { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -1233,6 +1234,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStreamAsync_EmptyResponseBody_HandlerProducesWellBehavedResponseStream() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -1402,6 +1404,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -1649,6 +1652,7 @@ await server.AcceptConnectionAsync(async connection => [Theory] [MemberData(nameof(Interim1xxStatusCode))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_Unexpected1xxResponses_DropAllInterimResponses(HttpStatusCode responseStatusCode) { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -2031,6 +2035,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_RequestVersion20_HttpNotHttps_NoUpgradeRequest() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) @@ -2066,6 +2071,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => #region Uri wire transmission encoding tests [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendRequest_UriPathHasReservedChars_ServerReceivedExpectedPath() { if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs index 4854082f16757..6bfc628c353e5 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs @@ -24,6 +24,7 @@ public HttpClientHandlerTest_Headers(ITestOutputHelper output) : base(output) { private sealed class DerivedHttpHeaders : HttpHeaders { } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_RequestWithSimpleHeader_ResponseReferencesUnmodifiedRequestHeaders() { const string HeaderKey = "some-header-123", HeaderValue = "this is the expected header value"; @@ -71,6 +72,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_LargeHeaders_CorrectlyWritten() { if (UseVersion == HttpVersion.Version30) @@ -106,6 +108,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_DefaultHeaders_CorrectlyWritten() { const string Version = "2017-04-17"; @@ -167,6 +170,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [InlineData("Accept-CharSet", "text/plain, text/json", false)] // invalid format for header but added with TryAddWithoutValidation [InlineData("Content-Location", "", false)] // invalid format for header but added with TryAddWithoutValidation [InlineData("Max-Forwards", "NotAnInteger", false)] // invalid format for header but added with TryAddWithoutValidation + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_SpecialHeaderKeyOrValue_Success(string key, string value, bool parsable) { if (PlatformDetection.IsBrowser && (key == "Content-Location" || key == "Date" || key == "Accept-CharSet")) @@ -212,6 +216,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [Theory] [InlineData("Content-Security-Policy", 4618)] [InlineData("RandomCustomHeader", 12345)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetAsync_LargeHeader_Success(string headerName, int headerValueLength) { var rand = new Random(42); @@ -236,6 +241,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetAsync_EmptyResponseHeader_Success() { IList headers = new HttpHeaderData[] { @@ -267,6 +273,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetAsync_MissingExpires_ReturnNull() { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -287,6 +294,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [InlineData("Thu, 01 Dec 1994 16:00:00 GMT", true)] [InlineData("-1", false)] [InlineData("0", false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_Expires_Success(string value, bool isValid) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -325,6 +333,7 @@ public void HeadersAdd_CustomExpires_Success(string value, bool isValid) [Theory] [InlineData("Accept-Encoding", "identity,gzip")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_RequestHeaderInResponse_Success(string name, string value) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => @@ -349,6 +358,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => [Theory] [InlineData(false)] [InlineData(true)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task SendAsync_GetWithValidHostHeader_Success(bool withPort) { if (UseVersion == HttpVersion.Version30) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs index c7456f013b4bd..0189e6a762dee 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs @@ -370,6 +370,7 @@ public async Task GetAsync_CustomException_Asynchronous_ThrowsException() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetStringAsync_Success() { string content = Guid.NewGuid().ToString(); @@ -389,6 +390,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetStringAsync_CanBeCanceled_AlreadyCanceledCts() { var onClientFinished = new SemaphoreSlim(0, 1); @@ -413,6 +415,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetStringAsync_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -539,6 +542,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetByteArrayAsync_Success() { string content = Guid.NewGuid().ToString(); @@ -583,6 +587,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetByteArrayAsync_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -613,6 +618,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetStreamAsync_Success() { string content = Guid.NewGuid().ToString(); @@ -660,6 +666,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task GetStreamAsync_CanBeCanceled() { var cts = new CancellationTokenSource(); diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs index fbf7594495931..249232587a498 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs @@ -613,6 +613,7 @@ public void Dispose_DisposedObjectThenAccessMembers_ThrowsObjectDisposedExceptio [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStringAsync_Buffered_IgnoresCancellationToken() { string content = Guid.NewGuid().ToString(); @@ -670,6 +671,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStringAsync_Unbuffered_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -707,6 +709,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsByteArrayAsync_Buffered_IgnoresCancellationToken() { string content = Guid.NewGuid().ToString(); @@ -765,6 +768,7 @@ await LoopbackServer.CreateClientAndServerAsync( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsByteArrayAsync_Unbuffered_CanBeCanceled() { var cts = new CancellationTokenSource(); @@ -804,6 +808,7 @@ await server.AcceptConnectionAsync(async connection => [Theory] [InlineData(true)] [InlineData(false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStreamAsync_Buffered_IgnoresCancellationToken(bool readStreamAsync) { string content = Guid.NewGuid().ToString(); @@ -835,6 +840,7 @@ await LoopbackServer.CreateClientAndServerAsync( [Theory] [InlineData(true)] [InlineData(false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task ReadAsStreamAsync_Unbuffered_IgnoresCancellationToken(bool readStreamAsync) { if(PlatformDetection.IsBrowser && !readStreamAsync) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs index 8c4ea2aa1a6e7..a3ba770f9cab5 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs @@ -267,6 +267,7 @@ await server.AcceptConnectionAsync(async connection => } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86326", typeof(PlatformDetection), nameof(PlatformDetection.IsNodeJS))] public async Task HttpRequest_BodylessMethod_LargeContentLength() { using (HttpClient client = CreateHttpClient())