Skip to content

Commit 58205e6

Browse files
committed
Fixup postive test
1 parent 565d5ee commit 58205e6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Servers/HttpSys/test/FunctionalTests/Http2Tests.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public async Task ConnectionClose_OSSupport_SendsGoAway()
109109

110110
await http2Utilities.StartStreamAsync(1, Http2Utilities._browserRequestHeaders, endStream: true);
111111

112+
var goAwayFrame = await http2Utilities.ReceiveFrameAsync();
113+
http2Utilities.VerifyGoAway(goAwayFrame, int.MaxValue, Http2ErrorCode.NO_ERROR);
114+
112115
var headersFrame = await http2Utilities.ReceiveFrameAsync();
113116

114117
Assert.Equal(Http2FrameType.HEADERS, headersFrame.Type);
@@ -123,20 +126,15 @@ public async Task ConnectionClose_OSSupport_SendsGoAway()
123126
Assert.False(decodedHeaders.ContainsKey(HeaderNames.Connection));
124127
Assert.Equal("200", decodedHeaders[HeaderNames.Status]);
125128

126-
var goAwayFrame = await http2Utilities.ReceiveFrameAsync();
127-
http2Utilities.VerifyGoAway(goAwayFrame, 1, Http2ErrorCode.NO_ERROR);
128-
129-
await http2Utilities.SendGoAwayAsync();
130-
// TODO: Close the connection?
131-
// await http2Utilities.StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false);
129+
await http2Utilities.StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false);
132130

133131
logger.LogInformation("Connection stopped.");
134132
};
135133
});
136134
})
137135
.Build();
138136

139-
await host.RunAsync();
137+
await host.RunHttp2CatAsync();
140138
}
141139
}
142140
}

0 commit comments

Comments
 (0)