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

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

Issue 132073002: Fix end_to_end_test performance regression caused by using mutexes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/quic_end_to_end_unittest.cc ('k') | net/tools/quic/test_tools/server_thread.h » ('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 dd4034443e6e4da3108c187606c6c0c6d7da3e40..f33deb7b5dfcdd197fab14f9bdb0cfe6fcb26341 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -218,19 +218,15 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
server_thread_.reset(new ServerThread(server_address_, server_config_,
server_supported_versions_,
strike_register_no_startup_period_));
- server_thread_->Start();
- server_thread_->WaitForServerStartup();
+ server_thread_->Initialize();
server_address_ = IPEndPoint(server_address_.address(),
server_thread_->GetPort());
QuicDispatcher* dispatcher =
QuicServerPeer::GetDispatcher(server_thread_->server());
+ QuicDispatcherPeer::UseWriter(dispatcher, server_writer_);
server_writer_->SetConnectionHelper(
QuicDispatcherPeer::GetHelper(dispatcher));
- // TODO(rtenneti): Enable server_thread's Pause/Resume.
- // server_thread_->Pause();
- QuicDispatcherPeer::UseWriter(dispatcher, server_writer_);
- // TODO(rtenneti): Enable server_thread's Pause/Resume.
- // server_thread_->Resume();
+ server_thread_->Start();
server_started_ = true;
}
@@ -728,9 +724,7 @@ TEST_P(EndToEndTest, InitialRTT) {
client_->client()->WaitForCryptoHandshakeConfirmed();
server_thread_->WaitForCryptoHandshakeConfirmed();
- // Pause the server so we can access the server's internals without races.
- // TODO(rtenneti): Enable server_thread's Pause/Resume.
- // server_thread_->Pause();
+ server_thread_->Pause();
QuicDispatcher* dispatcher =
QuicServerPeer::GetDispatcher(server_thread_->server());
ASSERT_EQ(1u, dispatcher->session_map().size());
@@ -751,8 +745,7 @@ TEST_P(EndToEndTest, InitialRTT) {
EXPECT_FALSE(client_sent_packet_manager.SmoothedRtt().IsInfinite());
EXPECT_GE(static_cast<int64>(kMaxInitialRoundTripTimeUs),
server_sent_packet_manager.SmoothedRtt().ToMicroseconds());
- // TODO(rtenneti): Enable server_thread's Pause/Resume.
- // server_thread_->Resume();
+ server_thread_->Resume();
}
TEST_P(EndToEndTest, ResetConnection) {
« no previous file with comments | « net/quic/quic_end_to_end_unittest.cc ('k') | net/tools/quic/test_tools/server_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698