Skip to content

Commit cc33b22

Browse files
authored
Fix race in FrameAfterTrailers_UnexpectedFrameError #30754 (#31061)
1 parent de013d4 commit cc33b22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,10 @@ public async Task FrameAfterTrailers_UnexpectedFrameError()
16851685
var requestStream = await InitializeConnectionAndStreamsAsync(_noopApplication);
16861686

16871687
await requestStream.SendHeadersAsync(headers, endStream: false);
1688+
1689+
// The app no-ops quickly. Wait for it here so it's not a race with the error response.
1690+
await requestStream.ExpectHeadersAsync();
1691+
16881692
await requestStream.SendDataAsync(Encoding.UTF8.GetBytes("Hello world"));
16891693
await requestStream.SendHeadersAsync(trailers, endStream: false);
16901694
await requestStream.SendDataAsync(Encoding.UTF8.GetBytes("This is invalid."));

0 commit comments

Comments
 (0)