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

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

Issue 1424653008: Make QUIC stateless rejects work in the face of packet loss by storing the SREJ packet(s) in the Qu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106432163
Patch Set: Created 5 years, 1 month 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_connection_peer.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | 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 6540ae569446c65e1e743337e4c1bbaa8917ba60..a91b2c74f57e73e841ae04212ffd21914266566d 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -474,7 +474,11 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
// EXPECT_EQ(0u, client_stats.packets_lost);
// }
EXPECT_EQ(0u, client_stats.packets_discarded);
- EXPECT_EQ(0u, client_stats.packets_dropped);
+ // When doing 0-RTT with stateless rejects, the encrypted requests cause
+ // a retranmission of the SREJ packets which are dropped by the client.
+ if (!BothSidesSupportStatelessRejects()) {
+ EXPECT_EQ(0u, client_stats.packets_dropped);
+ }
EXPECT_EQ(client_stats.packets_received, client_stats.packets_processed);
const int num_expected_stateless_rejects =
@@ -926,22 +930,9 @@ TEST_P(EndToEndTest, LargePostSynchronousRequest) {
TEST_P(EndToEndTest, StatelessRejectWithPacketLoss) {
// In this test, we intentionally drop the first packet from the
// server, which corresponds with the initial REJ/SREJ response from
- // the server. The REJ case will succeed, due to redundancy in the
- // stateful handshake. The SREJ will fail, because there is
- // (currently) no way to recover from a loss of the first SREJ, and
- // all remaining state for the first handshake is black-holed on the
- // time-wait list.
- // TODO(jokulik): Once redundant SREJ support is added, this test
- // should succeed.
+ // the server.
server_writer_->set_fake_drop_first_n_packets(1);
- // If this test will involve version negotiation then the version
- // negotiation packet will be dropped, not the SREJ, and since the
- // version negotiation packet will be retransmitted the test will
- // succeed.
- const bool will_succeed =
- !BothSidesSupportStatelessRejects() ||
- negotiated_version_ != client_supported_versions_.front();
- ASSERT_EQ(will_succeed, Initialize());
+ ASSERT_TRUE(Initialize());
}
TEST_P(EndToEndTest, SetInitialReceivedConnectionOptions) {
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698