Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUIC] Update to msquic 2 #67383

Merged
merged 7 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- (Debian.11.Amd64)Ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20210304164428-5a7c380
- Ubuntu.1804.Amd64
- (Centos.8.Amd64)Ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
- (Fedora.34.Amd64)Ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210728124700-4f64125
- (Fedora.34.Amd64)Ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220331150839-4f64125
- RedHat.7.Amd64

# OSX arm64
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ jobs:
- (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
- RedHat.7.Amd64.Open
- SLES.15.Amd64.Open
- (Fedora.34.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210913123654-4f64125
- (Fedora.34.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220331150839-4f64125
- (Ubuntu.2110.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-21.10-helix-amd64-20211116135132-0f8d97e
- (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-bfcd90a-20200121150006
- ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (Centos.8.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
- SLES.15.Amd64.Open
- (Fedora.34.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210913123654-4f64125
- (Fedora.34.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220331150839-4f64125
- (Ubuntu.2110.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-21.04-helix-amd64-20210922170909-34a2d72
- (Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20210304164428-5a7c380
- (Mariner.1.0.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
{
await server.AcceptConnectionAsync(connection => serverRelease.Task);
}
catch { }; // Ignore any closing errors since we did not really process anything.
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});
}

Expand Down Expand Up @@ -131,7 +134,11 @@ await ValidateClientCancellationAsync(async () =>
{
clientFinished.SetResult(true);
await serverTask;
} catch { }
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});
}
}
Expand Down Expand Up @@ -188,7 +195,11 @@ await ValidateClientCancellationAsync(async () =>
{
clientFinished.SetResult(true);
await serverTask;
} catch { }
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});
}
}
Expand Down Expand Up @@ -264,7 +275,11 @@ await ValidateClientCancellationAsync(async () =>
{
clientFinished.SetResult(true);
await serverTask;
} catch { }
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ await server.AcceptConnectionAsync(async connection =>
await Task.Delay(1);
}
}
catch { }
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});

Exception e = await Assert.ThrowsAsync<HttpRequestException>(() => getAsync);
Expand Down Expand Up @@ -136,7 +139,14 @@ await server.AcceptConnectionAsync(async connection =>
{
Assert.Contains((handler.MaxResponseHeadersLength * 1024).ToString(), e.ToString());
}
try { await serverTask; } catch { }
try
{
await serverTask;
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public async Task ProxyTunnelRequest_GetAsync_Success()
await LoopbackServer.CreateServerAsync(async (server, uri) =>
{
Assert.Equal(proxyServer.Uri, handler.Proxy.GetProxy(uri));

Task<HttpResponseMessage> clientTask = client.GetAsync(uri);
await server.AcceptConnectionSendResponseAndCloseAsync(content: Content);
using (var response = await clientTask)
Expand Down Expand Up @@ -578,7 +578,14 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri =>
using (HttpClient client = CreateHttpClient(handler))
{
handler.Proxy = new WebProxy(proxyUri);
try { await client.GetAsync(uri); } catch { }
try
{
await client.GetAsync(uri);
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}
}, server => server.AcceptConnectionAsync(async connection =>
{
Expand Down Expand Up @@ -611,7 +618,14 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri =>
using (HttpClient client = CreateHttpClient(handler))
{
handler.Proxy = new WebProxy(proxyUri);
try { await client.GetAsync(addressUri); } catch { }
try
{
await client.GetAsync(addressUri);
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}
}, server => server.AcceptConnectionAsync(async connection =>
{
Expand Down Expand Up @@ -639,7 +653,14 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri =>
{
handler.Proxy = new WebProxy(proxyUri);
handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates;
try { await client.GetAsync(addressUri); } catch { }
try
{
await client.GetAsync(addressUri);
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}
}, server => server.AcceptConnectionAsync(async connection =>
{
Expand Down
42 changes: 31 additions & 11 deletions src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,14 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri =>
using (HttpClient client = CreateHttpClient(handler))
{
handler.Proxy = new WebProxy(proxyUri);
try { await client.GetAsync(ipv6Address); } catch { }
try
{
await client.GetAsync(ipv6Address);
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}
}, server => server.AcceptConnectionAsync(async connection =>
{
Expand Down Expand Up @@ -292,7 +299,14 @@ await LoopbackServer.CreateClientAndServerAsync(async url =>
// we could not create SslStream in browser, [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)]
handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates;
}
try { await client.GetAsync(url); } catch { }
try
{
await client.GetAsync(url);
}
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}
}, server => server.AcceptConnectionAsync(async connection =>
{
Expand Down Expand Up @@ -449,7 +463,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
request.Headers.Referrer = new Uri("http://en.wikipedia.org/wiki/Main_Page");
request.Headers.TE.Add(new TransferCodingWithQualityHeaderValue("trailers"));
request.Headers.TE.Add(new TransferCodingWithQualityHeaderValue("deflate"));
if (PlatformDetection.IsNotNodeJS)
if (PlatformDetection.IsNotNodeJS)
{
request.Headers.Trailer.Add("MyTrailer");
request.Headers.TransferEncoding.Add(new TransferCodingHeaderValue("chunked"));
Expand All @@ -468,7 +482,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
request.Headers.Add("X-Requested-With", "XMLHttpRequest");
request.Headers.Add("DNT", "1 (Do Not Track Enabled)");
request.Headers.Add("X-Forwarded-For", "client1");
if (PlatformDetection.IsNotNodeJS)
if (PlatformDetection.IsNotNodeJS)
{
request.Headers.Add("X-Forwarded-For", "proxy1");
request.Headers.Add("X-Forwarded-For", "proxy2");
Expand All @@ -483,7 +497,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
request.Headers.Add("X-UIDH", "...");
request.Headers.Add("X-Csrf-Token", "i8XNjC4b8KVok4uw5RftR38Wgp2BFwql");
request.Headers.Add("X-Request-ID", "f058ebd6-02f7-4d3f-942e-904344e8cde5");
if (PlatformDetection.IsNotNodeJS)
if (PlatformDetection.IsNotNodeJS)
{
request.Headers.Add("X-Request-ID", "f058ebd6-02f7-4d3f-942e-904344e8cde5");
}
Expand Down Expand Up @@ -524,7 +538,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Assert.Equal($"Basic {authSafeValue}", requestData.GetSingleHeaderValue("Proxy-Authorization"));
Assert.Equal("Mozilla/5.0", requestData.GetSingleHeaderValue("User-Agent"));
Assert.Equal("http://en.wikipedia.org/wiki/Main_Page", requestData.GetSingleHeaderValue("Referer"));
if (PlatformDetection.IsNotNodeJS)
if (PlatformDetection.IsNotNodeJS)
{
Assert.Equal("MyTrailer", requestData.GetSingleHeaderValue("Trailer"));
}
Expand All @@ -543,7 +557,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Assert.Equal("bytes=500-999", requestData.GetSingleHeaderValue("Range"));
Assert.Equal("199 - \"Miscellaneous warning\"", requestData.GetSingleHeaderValue("Warning"));
Assert.Equal("XMLHttpRequest", requestData.GetSingleHeaderValue("X-Requested-With"));
if (PlatformDetection.IsNotNodeJS)
if (PlatformDetection.IsNotNodeJS)
{
Assert.Equal("client1, proxy1, proxy2", requestData.GetSingleHeaderValue("X-Forwarded-For"));
}
Expand All @@ -560,11 +574,11 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
Assert.Equal("http://wap.samsungmobile.com/uaprof/SGH-I777.xml", requestData.GetSingleHeaderValue("X-Wap-Profile"));
Assert.Equal("...", requestData.GetSingleHeaderValue("X-UIDH"));
Assert.Equal("i8XNjC4b8KVok4uw5RftR38Wgp2BFwql", requestData.GetSingleHeaderValue("X-Csrf-Token"));
if (PlatformDetection.IsNotNodeJS)
if (PlatformDetection.IsNotNodeJS)
{
Assert.Equal("f058ebd6-02f7-4d3f-942e-904344e8cde5, f058ebd6-02f7-4d3f-942e-904344e8cde5", requestData.GetSingleHeaderValue("X-Request-ID"));
}
else
else
{
// node-fetch polyfill doesn't support combining multiple header values
Assert.Equal("f058ebd6-02f7-4d3f-942e-904344e8cde5", requestData.GetSingleHeaderValue("X-Request-ID"));
Expand Down Expand Up @@ -892,7 +906,10 @@ await LoopbackServer.CreateServerAsync(async (server, url) =>
await Task.Delay(1);
}
}
catch { }
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});

await Assert.ThrowsAsync<HttpRequestException>(() => client.GetAsync(url));
Expand Down Expand Up @@ -1660,7 +1677,10 @@ await server.AcceptConnectionAsync(async connection =>
{
await connection.ReadRequestDataAsync(readBody: true);
}
catch { } // Eat errors from client disconnect.
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
await clientFinished.Task.WaitAsync(TimeSpan.FromMinutes(2));
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task SendAsync_GetUsingChunkedEncoding_ThrowsHttpRequestException()
using (HttpClient client = new HttpClient(handler))
{
HttpRequestException ex = await Assert.ThrowsAsync<HttpRequestException>(() => client.SendAsync(request));
_output.WriteLine(ex.ToString());
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
}

Expand Down Expand Up @@ -236,7 +236,7 @@ public async Task SendAsync_UseTcpKeepAliveOptions()
_output.WriteLine(responseContent);

// Uncomment this to observe an exchange of "TCP Keep-Alive" and "TCP Keep-Alive ACK" packets:
// await Task.Delay(5000);
// await Task.Delay(5000);
}

private async Task VerifyResponse(Task<HttpResponseMessage> task, string payloadText)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ await Http2LoopbackServer.CreateClientAndServerAsync(async uri =>
Http2LoopbackConnection connection = await server.EstablishConnectionAsync();
Assert.IsNotType<SslStream>(connection.Stream);

HttpRequestData requestData = await connection.ReadRequestDataAsync();
HttpRequestData requestData = await connection.ReadRequestDataAsync();
string requestContent = requestData.Body is null ? (string)null : Encoding.ASCII.GetString(requestData.Body);
Assert.Equal(clientContent, requestContent);
await connection.SendResponseAsync(HttpStatusCode.OK, content: serverContent);
Expand Down Expand Up @@ -3164,7 +3164,10 @@ await Http2LoopbackServer.CreateClientAndServerAsync(async url =>
await connection.SendGoAway(streamId);
await connection.WaitForConnectionShutdownAsync();
}
catch { };
catch (Exception ex)
{
_output.WriteLine($"Ignored exception:{Environment.NewLine}{ex}");
}
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ public async Task SendMoreThanStreamLimitRequestsConcurrently_LastWaits(int stre
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/53090")]
public async Task ReservedFrameType_Throws()
{
const int ReservedHttp2PriorityFrameId = 0x2;
Expand Down Expand Up @@ -1138,7 +1137,7 @@ public async Task RequestContentStreaming_Timeout_BothClientAndServerReceiveCanc

await requestStream.WriteAsync(message);
await requestStream.FlushAsync();

await Task.Delay(TimeSpan.FromSeconds(11)); // longer than client.Timeout

// Http3WriteStream is disposed after cancellation fired
Expand Down Expand Up @@ -1208,7 +1207,7 @@ public async Task RequestContentStreaming_Cancellation_BothClientAndServerReceiv

await requestStream.WriteAsync(message);
await requestStream.FlushAsync();

cts.Cancel();
await Task.Delay(250);

Expand Down Expand Up @@ -1291,7 +1290,7 @@ public async Task DuplexStreaming_RequestCTCancellation_DoesNotApply()

await requestStream.WriteAsync(message);
await requestStream.FlushAsync();

// cancelling after SendAsync finished should not apply -- nothing should happen
cts.Cancel();
await Task.Delay(250);
Expand Down
Loading