Skip to content

Commit 5c4ffe3

Browse files
[release/9.0-staging] Revert disabling of tests for HTTP servers (#114207)
* Revert "Disable tests using http://corefx-net-http11.azurewebsites.net (#111235)" This reverts commit de8e135. * Revert "Disable more tests dependent on http://corefx-net-http11.azurewebsites.net (#111354)" This reverts commit 9fea441. --------- Co-authored-by: Radek Zikmund <[email protected]>
1 parent c299641 commit 5c4ffe3

File tree

7 files changed

+22
-59
lines changed

7 files changed

+22
-59
lines changed

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

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,9 @@ public static Uri[] GetEchoServerList()
6464
if (PlatformDetection.IsFirefox)
6565
{
6666
// https://github.com/dotnet/runtime/issues/101115
67-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
68-
// return [RemoteEchoServer];
69-
return [];
67+
return [RemoteEchoServer];
7068
}
71-
return [
72-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
73-
// RemoteEchoServer,
74-
SecureRemoteEchoServer,
75-
Http2RemoteEchoServer
76-
];
69+
return [RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer];
7770
}
7871

7972
public static readonly Uri RemoteVerifyUploadServer = new Uri("http://" + Host + "/" + VerifyUploadHandler);
@@ -89,20 +82,8 @@ public static Uri[] GetEchoServerList()
8982
public static Uri RemoteLoopServer => new Uri("ws://" + RemoteLoopHost + "/" + RemoteLoopHandler);
9083

9184
public static readonly object[][] EchoServers = GetEchoServerList().Select(x => new object[] { x }).ToArray();
92-
public static readonly object[][] VerifyUploadServers = {
93-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
94-
// new object[] { RemoteVerifyUploadServer },
95-
new object[] { SecureRemoteVerifyUploadServer },
96-
new object[] { Http2RemoteVerifyUploadServer }
97-
};
98-
99-
public static readonly object[][] CompressedServers = {
100-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
101-
// new object[] { RemoteDeflateServer },
102-
new object[] { RemoteGZipServer },
103-
new object[] { Http2RemoteDeflateServer },
104-
new object[] { Http2RemoteGZipServer }
105-
};
85+
public static readonly object[][] VerifyUploadServers = { new object[] { RemoteVerifyUploadServer }, new object[] { SecureRemoteVerifyUploadServer }, new object[] { Http2RemoteVerifyUploadServer } };
86+
public static readonly object[][] CompressedServers = { new object[] { RemoteDeflateServer }, new object[] { RemoteGZipServer }, new object[] { Http2RemoteDeflateServer }, new object[] { Http2RemoteGZipServer } };
10687

10788
public static readonly object[][] Http2Servers = { new object[] { new Uri("https://" + Http2Host) } };
10889
public static readonly object[][] Http2NoPushServers = { new object[] { new Uri("https://" + Http2NoPushHost) } };
@@ -117,17 +98,9 @@ public static IEnumerable<RemoteServer> GetRemoteServers()
11798
if (PlatformDetection.IsFirefox)
11899
{
119100
// https://github.com/dotnet/runtime/issues/101115
120-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
121-
// return new RemoteServer[] { RemoteHttp11Server };
122-
return [];
101+
return new RemoteServer[] { RemoteHttp11Server };
123102
}
124-
return new RemoteServer[]
125-
{
126-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
127-
// RemoteHttp11Server,
128-
RemoteSecureHttp11Server,
129-
RemoteHttp2Server
130-
};
103+
return new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server };
131104
}
132105

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

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ public static object[][] GetEchoServers()
2828
{
2929
// https://github.com/dotnet/runtime/issues/101115
3030
return new object[][] {
31-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
32-
// new object[] { RemoteEchoServer },
33-
31+
new object[] { RemoteEchoServer },
3432
};
3533
}
3634
return new object[][] {
37-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
38-
// new object[] { RemoteEchoServer },
35+
new object[] { RemoteEchoServer },
3936
new object[] { SecureRemoteEchoServer },
4037
};
4138
}
@@ -46,13 +43,11 @@ public static object[][] GetEchoHeadersServers()
4643
{
4744
// https://github.com/dotnet/runtime/issues/101115
4845
return new object[][] {
49-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
50-
// new object[] { RemoteEchoHeadersServer },
46+
new object[] { RemoteEchoHeadersServer },
5147
};
5248
}
5349
return new object[][] {
54-
// [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)]
55-
// new object[] { RemoteEchoHeadersServer },
50+
new object[] { RemoteEchoHeadersServer },
5651
new object[] { SecureRemoteEchoHeadersServer },
5752
};
5853
}

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeU
7171
handler.UseDefaultCredentials = false;
7272
using (HttpClient client = CreateHttpClient(handler))
7373
{
74-
Uri uri = Configuration.Http.RemoteSecureHttp11Server.NegotiateAuthUriForDefaultCreds;
74+
Uri uri = Configuration.Http.RemoteHttp11Server.NegotiateAuthUriForDefaultCreds;
7575
_output.WriteLine("Uri: {0}", uri);
7676
using (HttpResponseMessage response = await client.GetAsync(uri))
7777
{
@@ -602,9 +602,9 @@ public async Task PostAsync_CallMethod_EmptyContent(Configuration.Http.RemoteSer
602602
public static IEnumerable<object[]> ExpectContinueVersion()
603603
{
604604
return
605-
from expect in new bool?[] { true, false, null }
606-
from version in new Version[] { new Version(1, 0), new Version(1, 1), new Version(2, 0) }
607-
select new object[] { expect, version };
605+
from expect in new bool?[] {true, false, null}
606+
from version in new Version[] {new Version(1, 0), new Version(1, 1), new Version(2, 0)}
607+
select new object[] {expect, version};
608608
}
609609

610610
[OuterLoop("Uses external servers", typeof(PlatformDetection), nameof(PlatformDetection.LocalEchoServerIsNotAvailable))]
@@ -776,8 +776,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth
776776
{
777777
var request = new HttpRequestMessage(
778778
new HttpMethod(method),
779-
serverUri)
780-
{ Version = UseVersion };
779+
serverUri) { Version = UseVersion };
781780

782781
using (HttpResponseMessage response = await client.SendAsync(TestAsync, request))
783782
{
@@ -803,8 +802,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes
803802
{
804803
var request = new HttpRequestMessage(
805804
new HttpMethod(method),
806-
serverUri)
807-
{ Version = UseVersion };
805+
serverUri) { Version = UseVersion };
808806
request.Content = new StringContent(ExpectedContent);
809807
using (HttpResponseMessage response = await client.SendAsync(TestAsync, request))
810808
{
@@ -983,7 +981,6 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCo
983981
[OuterLoop("Uses external servers")]
984982
[Fact]
985983
[ActiveIssue("https://github.com/dotnet/runtime/issues/55083", TestPlatforms.Browser)]
986-
[ActiveIssue("https://github.com/dotnet/runtime/issues/110578")]
987984
public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusCodeOK()
988985
{
989986
HttpClientHandler handler = CreateHttpClientHandler();
@@ -1068,17 +1065,17 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i
10681065
handler.MaxAutomaticRedirections = maxHops;
10691066
using (HttpClient client = CreateHttpClient(handler))
10701067
{
1071-
Task<HttpResponseMessage> t = client.GetAsync(Configuration.Http.RemoteSecureHttp11Server.RedirectUriForDestinationUri(
1068+
Task<HttpResponseMessage> t = client.GetAsync(Configuration.Http.RemoteHttp11Server.RedirectUriForDestinationUri(
10721069
statusCode: 302,
1073-
destinationUri: Configuration.Http.RemoteSecureHttp11Server.EchoUri,
1070+
destinationUri: Configuration.Http.RemoteHttp11Server.EchoUri,
10741071
hops: hops));
10751072

10761073
if (hops <= maxHops)
10771074
{
10781075
using (HttpResponseMessage response = await t)
10791076
{
10801077
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
1081-
Assert.Equal(Configuration.Http.SecureRemoteEchoServer, response.RequestMessage.RequestUri);
1078+
Assert.Equal(Configuration.Http.RemoteEchoServer, response.RequestMessage.RequestUri);
10821079
}
10831080
}
10841081
else

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior
9797

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public async Task NoCallback_ValidCertificate_CallbackNotCalled()
3232

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

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

Lines changed: 1 addition & 1 deletion
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.RemoteSecureHttp11Server.RedirectUriForDestinationUri(302, System.Net.Test.Common.Configuration.Http.SecureRemoteEchoServer, 1);
58+
Uri uri = System.Net.Test.Common.Configuration.Http.RemoteHttp11Server.RedirectUriForDestinationUri(302, System.Net.Test.Common.Configuration.Http.RemoteEchoServer, 1);
5959
var handler = new WinHttpHandler();
6060
handler.WindowsProxyUsePolicy = WindowsProxyUsePolicy.UseWinInetProxy;
6161
handler.CookieUsePolicy = cookieUsePolicy;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public async Task ExternalServer_DurationMetrics_Recorded()
381381
using InstrumentRecorder<long> openConnectionsRecorder = SetupInstrumentRecorder<long>(InstrumentNames.OpenConnections);
382382

383383
Uri uri = UseVersion == HttpVersion.Version11
384-
? Test.Common.Configuration.Http.RemoteSecureHttp11Server.EchoUri
384+
? Test.Common.Configuration.Http.RemoteHttp11Server.EchoUri
385385
: Test.Common.Configuration.Http.RemoteHttp2Server.EchoUri;
386386
IPAddress[] addresses = await Dns.GetHostAddressesAsync(uri.Host);
387387
addresses = addresses.Union(addresses.Select(a => a.MapToIPv6())).ToArray();
@@ -1259,7 +1259,7 @@ public Task RequestDuration_Redirect_RecordedForEachHttpSpan()
12591259
});
12601260

12611261
}, options: new GenericLoopbackOptions() { UseSsl = true });
1262-
}, options: new GenericLoopbackOptions() { UseSsl = false });
1262+
}, options: new GenericLoopbackOptions() { UseSsl = false});
12631263
}
12641264

12651265
[Fact]

0 commit comments

Comments
 (0)