Skip to content

Commit 7bdb3db

Browse files
authored
[release/8.0] Disable tests targetting http://corefx-net-http11.azurewebsites.net (#111401)
* Disable more tests dependent on http://corefx-net-http11.azurewebsites.net (#111354) * Disable more tests dependent on http://corefx-net-http11.azurewebsites.net * Disable winhttphandlertests * Disable tests using http://corefx-net-http11.azurewebsites.net (#111235) Disabling until HTTPS redirection can be turned off at the server. * Fix build * another attempt to fix build * Fix build
1 parent 06672a3 commit 7bdb3db

File tree

7 files changed

+55
-17
lines changed

7 files changed

+55
-17
lines changed

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

+28-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ public static partial class Http
5858
public static readonly Uri RemoteEchoServer = new Uri("http://" + Host + "/" + EchoHandler);
5959
public static readonly Uri SecureRemoteEchoServer = new Uri("https://" + SecureHost + "/" + EchoHandler);
6060
public static readonly Uri Http2RemoteEchoServer = new Uri("https://" + Http2Host + "/" + EchoHandler);
61-
public static readonly Uri[] EchoServerList = new Uri[] { RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer };
61+
public static Uri[] EchoServerList => [
62+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
63+
// RemoteEchoServer,
64+
SecureRemoteEchoServer,
65+
Http2RemoteEchoServer
66+
];
6267

6368
public static readonly Uri RemoteVerifyUploadServer = new Uri("http://" + Host + "/" + VerifyUploadHandler);
6469
public static readonly Uri SecureRemoteVerifyUploadServer = new Uri("https://" + SecureHost + "/" + VerifyUploadHandler);
@@ -73,8 +78,20 @@ public static partial class Http
7378
public static Uri RemoteLoopServer => new Uri("ws://" + RemoteLoopHost + "/" + RemoteLoopHandler);
7479

7580
public static readonly object[][] EchoServers = EchoServerList.Select(x => new object[] { x }).ToArray();
76-
public static readonly object[][] VerifyUploadServers = { new object[] { RemoteVerifyUploadServer }, new object[] { SecureRemoteVerifyUploadServer }, new object[] { Http2RemoteVerifyUploadServer } };
77-
public static readonly object[][] CompressedServers = { new object[] { RemoteDeflateServer }, new object[] { RemoteGZipServer }, new object[] { Http2RemoteDeflateServer }, new object[] { Http2RemoteGZipServer } };
81+
public static readonly object[][] VerifyUploadServers = {
82+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
83+
// new object[] { RemoteVerifyUploadServer },
84+
new object[] { SecureRemoteVerifyUploadServer },
85+
new object[] { Http2RemoteVerifyUploadServer }
86+
};
87+
88+
public static readonly object[][] CompressedServers = {
89+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
90+
// new object[] { RemoteDeflateServer },
91+
new object[] { RemoteGZipServer },
92+
new object[] { Http2RemoteDeflateServer },
93+
new object[] { Http2RemoteGZipServer }
94+
};
7895

7996
public static readonly object[][] Http2Servers = { new object[] { new Uri("https://" + Http2Host) } };
8097
public static readonly object[][] Http2NoPushServers = { new object[] { new Uri("https://" + Http2NoPushHost) } };
@@ -83,7 +100,14 @@ public static partial class Http
83100
public static readonly RemoteServer RemoteSecureHttp11Server = new RemoteServer(new Uri("https://" + SecureHost + "/"), HttpVersion.Version11);
84101
public static readonly RemoteServer RemoteHttp2Server = new RemoteServer(new Uri("https://" + Http2Host + "/"), new Version(2, 0));
85102

86-
public static readonly IEnumerable<RemoteServer> RemoteServers = new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server };
103+
public static IEnumerable<RemoteServer> RemoteServers =>
104+
new RemoteServer[]
105+
{
106+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
107+
// RemoteHttp11Server,
108+
RemoteSecureHttp11Server,
109+
RemoteHttp2Server
110+
};
87111

88112
public static readonly IEnumerable<object[]> RemoteServersMemberData = RemoteServers.Select(s => new object[] { s });
89113

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@ public static partial class WebSockets
2222
public static readonly Uri RemoteEchoHeadersServer = new Uri("ws://" + Host + "/" + EchoHeadersHandler);
2323
public static readonly Uri SecureRemoteEchoHeadersServer = new Uri("wss://" + SecureHost + "/" + EchoHeadersHandler);
2424

25-
public static readonly object[][] EchoServers = { new object[] { RemoteEchoServer }, new object[] { SecureRemoteEchoServer } };
26-
public static readonly object[][] EchoHeadersServers = { new object[] { RemoteEchoHeadersServer }, new object[] { SecureRemoteEchoHeadersServer } };
25+
public static object[][] EchoServers => new object[][] {
26+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
27+
// new object[] { RemoteEchoServer },
28+
new object[] { SecureRemoteEchoServer },
29+
};
30+
31+
public static object[][] EchoHeadersServers => new object[][] {
32+
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
33+
// new object[] { RemoteEchoHeadersServer },
34+
new object[] { SecureRemoteEchoHeadersServer },
35+
};
2736
}
2837
}
2938
}

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

+12-9
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeU
7070
handler.UseDefaultCredentials = false;
7171
using (HttpClient client = CreateHttpClient(handler))
7272
{
73-
Uri uri = Configuration.Http.RemoteHttp11Server.NegotiateAuthUriForDefaultCreds;
73+
Uri uri = Configuration.Http.RemoteSecureHttp11Server.NegotiateAuthUriForDefaultCreds;
7474
_output.WriteLine("Uri: {0}", uri);
7575
using (HttpResponseMessage response = await client.GetAsync(uri))
7676
{
@@ -600,9 +600,9 @@ public async Task PostAsync_CallMethod_EmptyContent(Configuration.Http.RemoteSer
600600
public static IEnumerable<object[]> ExpectContinueVersion()
601601
{
602602
return
603-
from expect in new bool?[] {true, false, null}
604-
from version in new Version[] {new Version(1, 0), new Version(1, 1), new Version(2, 0)}
605-
select new object[] {expect, version};
603+
from expect in new bool?[] { true, false, null }
604+
from version in new Version[] { new Version(1, 0), new Version(1, 1), new Version(2, 0) }
605+
select new object[] { expect, version };
606606
}
607607

608608
[OuterLoop("Uses external servers", typeof(PlatformDetection), nameof(PlatformDetection.LocalEchoServerIsNotAvailable))]
@@ -780,7 +780,8 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth
780780
{
781781
var request = new HttpRequestMessage(
782782
new HttpMethod(method),
783-
serverUri) { Version = UseVersion };
783+
serverUri)
784+
{ Version = UseVersion };
784785

785786
using (HttpResponseMessage response = await client.SendAsync(TestAsync, request))
786787
{
@@ -806,7 +807,8 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes
806807
{
807808
var request = new HttpRequestMessage(
808809
new HttpMethod(method),
809-
serverUri) { Version = UseVersion };
810+
serverUri)
811+
{ Version = UseVersion };
810812
request.Content = new StringContent(ExpectedContent);
811813
using (HttpResponseMessage response = await client.SendAsync(TestAsync, request))
812814
{
@@ -985,6 +987,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCo
985987
[OuterLoop("Uses external servers")]
986988
[Fact]
987989
[ActiveIssue("https://github.com/dotnet/runtime/issues/55083", TestPlatforms.Browser)]
990+
[ActiveIssue("https://github.com/dotnet/runtime/issues/110578")]
988991
public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusCodeOK()
989992
{
990993
HttpClientHandler handler = CreateHttpClientHandler();
@@ -1069,17 +1072,17 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i
10691072
handler.MaxAutomaticRedirections = maxHops;
10701073
using (HttpClient client = CreateHttpClient(handler))
10711074
{
1072-
Task<HttpResponseMessage> t = client.GetAsync(Configuration.Http.RemoteHttp11Server.RedirectUriForDestinationUri(
1075+
Task<HttpResponseMessage> t = client.GetAsync(Configuration.Http.RemoteSecureHttp11Server.RedirectUriForDestinationUri(
10731076
statusCode: 302,
1074-
destinationUri: Configuration.Http.RemoteHttp11Server.EchoUri,
1077+
destinationUri: Configuration.Http.RemoteSecureHttp11Server.EchoUri,
10751078
hops: hops));
10761079

10771080
if (hops <= maxHops)
10781081
{
10791082
using (HttpResponseMessage response = await t)
10801083
{
10811084
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
1082-
Assert.Equal(Configuration.Http.RemoteEchoServer, response.RequestMessage.RequestUri);
1085+
Assert.Equal(Configuration.Http.SecureRemoteEchoServer, response.RequestMessage.RequestUri);
10831086
}
10841087
}
10851088
else

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

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior
9797

9898
[OuterLoop("Uses external servers")]
9999
[Fact]
100+
[ActiveIssue("https://github.com/dotnet/runtime/issues/110578")]
100101
public async Task UseCallback_NotSecureConnection_CallbackNotCalled()
101102
{
102103
HttpClientHandler handler = CreateHttpClientHandler();

src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public async Task NoCallback_ValidCertificate_CallbackNotCalled()
3232

3333
[OuterLoop]
3434
[Fact]
35+
[ActiveIssue("https://github.com/dotnet/runtime/issues/110578")]
3536
public async Task UseCallback_NotSecureConnection_CallbackNotCalled()
3637
{
3738
var handler = new WinHttpHandler();

src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public async Task GetAsync_RedirectResponseHasCookie_CookieSentToFinalUri(
5555
string cookieName,
5656
string cookieValue)
5757
{
58-
Uri uri = System.Net.Test.Common.Configuration.Http.RemoteHttp11Server.RedirectUriForDestinationUri(302, System.Net.Test.Common.Configuration.Http.RemoteEchoServer, 1);
58+
Uri uri = System.Net.Test.Common.Configuration.Http.RemoteSecureHttp11Server.RedirectUriForDestinationUri(302, System.Net.Test.Common.Configuration.Http.SecureRemoteEchoServer, 1);
5959
var handler = new WinHttpHandler();
6060
handler.WindowsProxyUsePolicy = WindowsProxyUsePolicy.UseWinInetProxy;
6161
handler.CookieUsePolicy = cookieUsePolicy;

src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ public Task RequestDuration_Redirect_RecordedForEachHttpSpan()
11121112
});
11131113

11141114
}, options: new GenericLoopbackOptions() { UseSsl = true });
1115-
}, options: new GenericLoopbackOptions() { UseSsl = false});
1115+
}, options: new GenericLoopbackOptions() { UseSsl = false });
11161116
}
11171117

11181118
[Fact]

0 commit comments

Comments
 (0)