Skip to content

Commit

Permalink
make Http2_RequestFailsWithAppropriateHttpProtocolException test more…
Browse files Browse the repository at this point in the history
… deterministic (#94112)

* make Http2_IncorrectServerPreface_RequestFailsWithAppropriateHttpProtocolException test more deterministic

* feedback
  • Loading branch information
wfurt authored Oct 31, 2023
1 parent d5435e4 commit 748dd8e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ public async Task Http2_StreamResetByServerBeforePrefix_RequestFailsWithGoawayPr

Http2LoopbackConnection connection = await server.AcceptConnectionAsync(timeout: null);
_ = await connection.ReadSettingsAsync();

// Wait until client starts sending request
_ = await connection.ReadFrameAsync(TestHelper.PassingTestTimeout);
GoAwayFrame goAwayFrame = new GoAwayFrame(lastStreamId: 0, (int)ProtocolErrors.HTTP_1_1_REQUIRED, additionalDebugData: Array.Empty<byte>(), streamId: 0);
await connection.WriteFrameAsync(goAwayFrame);

Expand Down Expand Up @@ -319,6 +320,8 @@ public async Task Http2_IncorrectServerPreface_RequestFailsWithAppropriateHttpPr

Http2LoopbackConnection connection = await server.AcceptConnectionAsync();
await connection.ReadSettingsAsync();
// Wait until client starts sending request
_ = await connection.ReadFrameAsync(TestHelper.PassingTestTimeout);
await connection.SendGoAway(0, ProtocolErrors.INTERNAL_ERROR);

await AssertProtocolErrorAsync(sendTask, ProtocolErrors.INTERNAL_ERROR);
Expand Down

0 comments on commit 748dd8e

Please sign in to comment.