Redisign HTTP/2 KeepAlive PING tests (#56736)
authorAnton Firszov <Anton.Firszov@microsoft.com>
Fri, 6 Aug 2021 12:41:04 +0000 (14:41 +0200)
committerGitHub <noreply@github.com>
Fri, 6 Aug 2021 12:41:04 +0000 (14:41 +0200)
commita8baca13ea08916e32b57413488a6cd0a20c6d13
treeb9328e02549ce65656b4909c62e1738e6f82d0bd
parent6f19f67a5144a0a575ccc4ef98b21e8d61432b5f
Redisign HTTP/2 KeepAlive PING tests (#56736)

Completely redesign tests for HTTP/2 KeepAlive PING, so they:
- Work well with RTT pings introduced in Implement dynamic HTTP/2 window scaling #54755
- Run sequentially, reducing the chance of failing because of timing issues caused by parallel workloads
- Are better organized: multiple test cases for different scenarios, instead of one theory with complex branches on parameters

Instead of reading / reacting to frames inline, there is a separate Task for processing incoming frames, responding to PING immediately and pushing other frames to a Channel<Frame>.

Fixes #41929
src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2FlowControl.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2KeepAlivePing.cs [new file with mode: 0644]
src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj