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) { |