Adapt existing HttpClientMiniStress tests to support HTTP/2 (dotnet/corefx#38619)
authorStephen Toub <stoub@microsoft.com>
Tue, 18 Jun 2019 22:08:38 +0000 (18:08 -0400)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2019 22:08:38 +0000 (18:08 -0400)
commit8c3432f15f20705cd31ce4eddf6cbbe874d89361
treefd05c63c1848413fa6dee4254efb012c1925adcb
parent312caa957410a4b65f38ae028719dd11f7632912
Adapt existing HttpClientMiniStress tests to support HTTP/2 (dotnet/corefx#38619)

This adapts the existing HttpClientMiniStress tests to run with HTTP/2 as well as HTTP/1.1.  Some caveats, though:
- All of these existing tests spin up a new server per request, so they're not stressing arguably the most important aspect of the client's HTTP/2 implementation, that of sharing the single connection across all requests.  Our loopback server is not currently robust enough to handle concurrent requests; we should look at switching over to using Kestrel.
- The tests run really slowly, ~40x slower than for HTTP/1.1.  However, the HTTP/1.1 tests are non-SSL, these are of course SSL, and it looks like that's actually the difference.  In particular, something about how our test server gets its test certificate appears to be taking the vast majority of the time. (We should separately see if we could tweak that, not just for this purpose, but more so to help speed up the whole suite.)

Commit migrated from https://github.com/dotnet/corefx/commit/a7c893ab3d3e50b11c7fa2338882c8964e0a290d
src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs
src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientMiniStressTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj