Skip to content

Commit 23edb79

Browse files
github-actions[bot]rokonecrzikm
authored
[release/8.0] Test failure - SendAsync_RequestVersion20_ResponseVersion20 (#113648)
* Trying to add user agent header. * Test another way * Change server to httpbin * Update Http2NoPushHost and add Http2NoPushGetUris for improved testing --------- Co-authored-by: Roman Konecny <[email protected]> Co-authored-by: Radek Zikmund <[email protected]>
1 parent 281540d commit 23edb79

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libraries/Common/tests/System/Net/Configuration.Http.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static partial class Http
2121

2222
// This server doesn't use HTTP/2 server push (push promise) feature. Some HttpClient implementations
2323
// don't support servers that use push right now.
24-
public static string Http2NoPushHost => GetValue("DOTNET_TEST_HTTP2NOPUSHHOST", "www.microsoft.com");
24+
public static string Http2NoPushHost => GetValue("DOTNET_TEST_HTTP2NOPUSHHOST", "httpbin.org");
2525

2626
// Domain server environment.
2727
public static string DomainJoinedHttpHost => GetValue("DOTNET_TEST_DOMAINJOINED_HTTPHOST");
@@ -95,6 +95,7 @@ public static partial class Http
9595

9696
public static readonly object[][] Http2Servers = { new object[] { new Uri("https://" + Http2Host) } };
9797
public static readonly object[][] Http2NoPushServers = { new object[] { new Uri("https://" + Http2NoPushHost) } };
98+
public static readonly object[][] Http2NoPushGetUris = { new object[] { new Uri("https://" + Http2NoPushHost + "/get") } };
9899

99100
public static readonly RemoteServer RemoteHttp11Server = new RemoteServer(new Uri("http://" + Host + "/"), HttpVersion.Version11);
100101
public static readonly RemoteServer RemoteSecureHttp11Server = new RemoteServer(new Uri("https://" + SecureHost + "/"), HttpVersion.Version11);

src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public sealed class HttpClientHandler_RemoteServerTest : HttpClientHandlerTestBa
3131

3232
public static readonly object[][] Http2Servers = Configuration.Http.Http2Servers;
3333
public static readonly object[][] Http2NoPushServers = Configuration.Http.Http2NoPushServers;
34+
public static readonly object[][] Http2NoPushGetUris = Configuration.Http.Http2NoPushGetUris;
3435

3536
// Standard HTTP methods defined in RFC7231: http://tools.ietf.org/html/rfc7231#section-4.3
3637
// "GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS", "TRACE"
@@ -1368,7 +1369,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U
13681369
}
13691370

13701371
[OuterLoop("Uses external servers")]
1371-
[ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushServers))]
1372+
[ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushGetUris))]
13721373
public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server)
13731374
{
13741375
// Sync API supported only up to HTTP/1.1

0 commit comments

Comments
 (0)