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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 2327743004: Fix two TSAN bugs exposed when running with -c opt: (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/tools/quic/quic_in_memory_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <sys/epoll.h> 6 #include <sys/epoll.h>
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 case kTBBR: 1361 case kTBBR:
1362 expected_congestion_control_type = kBBR; 1362 expected_congestion_control_type = kBBR;
1363 break; 1363 break;
1364 case kQBIC: 1364 case kQBIC:
1365 expected_congestion_control_type = kCubic; 1365 expected_congestion_control_type = kCubic;
1366 break; 1366 break;
1367 default: 1367 default:
1368 DLOG(FATAL) << "Unexpected congestion control tag"; 1368 DLOG(FATAL) << "Unexpected congestion control tag";
1369 } 1369 }
1370 1370
1371 server_thread_->Pause();
1371 EXPECT_EQ(expected_congestion_control_type, 1372 EXPECT_EQ(expected_congestion_control_type,
1372 QuicSentPacketManagerPeer::GetSendAlgorithm( 1373 QuicSentPacketManagerPeer::GetSendAlgorithm(
1373 *static_cast<const QuicSentPacketManager*>( 1374 *static_cast<const QuicSentPacketManager*>(
1374 GetSentPacketManagerFromFirstServerSession())) 1375 GetSentPacketManagerFromFirstServerSession()))
1375 ->GetCongestionControlType()); 1376 ->GetCongestionControlType());
1377 server_thread_->Resume();
1376 } 1378 }
1377 1379
1378 TEST_P(EndToEndTest, LimitMaxOpenStreams) { 1380 TEST_P(EndToEndTest, LimitMaxOpenStreams) {
1379 // Server limits the number of max streams to 2. 1381 // Server limits the number of max streams to 2.
1380 server_config_.SetMaxStreamsPerConnection(2, 2); 1382 server_config_.SetMaxStreamsPerConnection(2, 2);
1381 // Client tries to negotiate for 10. 1383 // Client tries to negotiate for 10.
1382 client_config_.SetMaxStreamsPerConnection(10, 5); 1384 client_config_.SetMaxStreamsPerConnection(10, 5);
1383 1385
1384 ASSERT_TRUE(Initialize()); 1386 ASSERT_TRUE(Initialize());
1385 client_->client()->WaitForCryptoHandshakeConfirmed(); 1387 client_->client()->WaitForCryptoHandshakeConfirmed();
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 EXPECT_EQ(kBarResponseBody, client_->response_body()); 2923 EXPECT_EQ(kBarResponseBody, client_->response_body());
2922 QuicConnectionStats client_stats = 2924 QuicConnectionStats client_stats =
2923 client_->client()->session()->connection()->GetStats(); 2925 client_->client()->session()->connection()->GetStats();
2924 EXPECT_EQ(0u, client_stats.packets_lost); 2926 EXPECT_EQ(0u, client_stats.packets_lost);
2925 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); 2927 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos());
2926 } 2928 }
2927 2929
2928 } // namespace 2930 } // namespace
2929 } // namespace test 2931 } // namespace test
2930 } // namespace net 2932 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/tools/quic/quic_in_memory_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698