| 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 d63977e741605a5addd9d1759253c2c199ba325c..8281ae37e50fe321d4b2eee9e8a7b829df6058ac 100644
|
| --- a/net/tools/quic/end_to_end_test.cc
|
| +++ b/net/tools/quic/end_to_end_test.cc
|
| @@ -1417,9 +1417,13 @@ TEST_P(EndToEndTest, ServerSendPublicResetWithDifferentConnectionId) {
|
| client_->client()->session()->connection()->set_debug_visitor(&visitor);
|
| EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id))
|
| .Times(1);
|
| + // We must pause the server's thread in order to call WritePacket without
|
| + // race conditions.
|
| + server_thread_->Pause();
|
| server_writer_->WritePacket(packet->data(), packet->length(),
|
| server_address_.address(),
|
| client_->client()->client_address());
|
| + server_thread_->Resume();
|
|
|
| // The connection should be unaffected.
|
| EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
|
| @@ -1473,9 +1477,13 @@ TEST_P(EndToEndTest, ServerSendVersionNegotiationWithDifferentConnectionId) {
|
| client_->client()->session()->connection()->set_debug_visitor(&visitor);
|
| EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id))
|
| .Times(1);
|
| + // We must pause the server's thread in order to call WritePacket without
|
| + // race conditions.
|
| + server_thread_->Pause();
|
| server_writer_->WritePacket(packet->data(), packet->length(),
|
| server_address_.address(),
|
| client_->client()->client_address());
|
| + server_thread_->Resume();
|
|
|
| // The connection should be unaffected.
|
| EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
|
|
|