Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 2916033003: Landing Recent QUIC changes until 03:18 AM, May 28, UTC (Closed)
Patch Set: A few more EXPORTs. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/simulator/quic_endpoint_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/end_to_end_test.cc
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index ca66c54988be71e5804798effcdb14069a220a2e..59b09424f93f33169a85f97c6c172484d67718e8 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -555,7 +555,9 @@ class EndToEndTest : public QuicTestWithParam<TestParams> {
void VerifyCleanConnection(bool had_packet_loss) {
QuicConnectionStats client_stats =
client_->client()->session()->connection()->GetStats();
- if (!had_packet_loss) {
+ // TODO(ianswett): Determine why this becomes even more flaky with BBR
+ // enabled. b/62141144
+ if (!had_packet_loss && !FLAGS_quic_reloadable_flag_quic_default_to_bbr) {
EXPECT_EQ(0u, client_stats.packets_lost);
}
EXPECT_EQ(0u, client_stats.packets_discarded);
@@ -2250,6 +2252,27 @@ TEST_P(EndToEndTest, BadEncryptedData) {
EXPECT_EQ("200", client_->response_headers()->find(":status")->second);
}
+TEST_P(EndToEndTest, CanceledStreamDoesNotBecomeZombie) {
+ ASSERT_TRUE(Initialize());
+ if (!FLAGS_quic_reloadable_flag_quic_use_stream_notifier) {
+ return;
+ }
+
+ EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed());
+ // Lose the request.
+ SetPacketLossPercentage(100);
+ client_->SendRequest("/small_response");
+ // Cancel the stream, and let the RST_STREAM go through.
+ SetPacketLossPercentage(0);
+ QuicSpdyClientStream* stream = client_->GetOrCreateStream();
+ // Reset stream.
+ stream->Reset(QUIC_STREAM_CANCELLED);
+ QuicSession* session = client_->client()->session();
+ // Verify canceled stream does not become zombie.
+ EXPECT_TRUE(QuicSessionPeer::zombie_streams(session).empty());
+ EXPECT_EQ(1u, QuicSessionPeer::closed_streams(session).size());
+}
+
// A test stream that gives |response_body_| as an error response body.
class ServerStreamWithErrorResponseBody : public QuicSimpleServerStream {
public:
« no previous file with comments | « net/quic/test_tools/simulator/quic_endpoint_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698