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

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

Issue 259613002: Fix a TSAN failure of QUIC's EndToEndTest where the value of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | 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 30c9e4ba180a59c6c9696af14651ad0123470975..e2529be80570a26c1061b9cf7ad5bb7668b6d9b8 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -304,6 +304,8 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
// Verifies that the client and server connections were both free of packets
// being discarded, based on connection stats.
+ // Calls server_thread_ Pause() and Resume(), which may only be called once
+ // per test.
void VerifyCleanConnection(bool had_packet_loss) {
QuicConnectionStats client_stats =
client_->client()->session()->connection()->GetStats();
@@ -314,6 +316,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
EXPECT_EQ(0u, client_stats.packets_dropped);
EXPECT_EQ(client_stats.packets_received, client_stats.packets_processed);
+ server_thread_->Pause();
QuicDispatcher* dispatcher =
QuicServerPeer::GetDispatcher(server_thread_->server());
ASSERT_EQ(1u, dispatcher->session_map().size());
@@ -326,6 +329,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
// TODO(ianswett): Restore the check for packets_dropped equals 0.
// The expect for packets received is equal to packets processed fails
// due to version negotiation packets.
+ server_thread_->Resume();
}
IPEndPoint server_address_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698