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

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

Issue 2915873003: This QUIC change includes: (Closed)
Patch Set: 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/quic_session_peer.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..a17aaaac314489e070d52aed4633953cc6fc58e8 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -2250,6 +2250,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/quic_session_peer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698