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

Side by Side Diff: webrtc/p2p/client/portallocator_unittest.cc

Issue 1160033005: Disable some PortAllocatorTest on tsan due to flakiness (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // candidate since we bind to any address (i.e. all 0s). 465 // candidate since we bind to any address (i.e. all 0s).
466 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationMultipleInterfaces) { 466 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationMultipleInterfaces) {
467 AddInterface(kPrivateAddr); 467 AddInterface(kPrivateAddr);
468 AddInterface(kPrivateAddr2); 468 AddInterface(kPrivateAddr2);
469 ResetWithNatServer(kStunAddr); 469 ResetWithNatServer(kStunAddr);
470 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress()); 470 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress());
471 471
472 CheckDisableAdapterEnumeration(); 472 CheckDisableAdapterEnumeration();
473 } 473 }
474 474
475 // Disable for TSan v2, see
476 // https://code.google.com/p/webrtc/issues/detail?id=4743 for details.
477 #if !defined(THREAD_SANITIZER)
478
475 // Test that we can get OnCandidatesAllocationDone callback when all the ports 479 // Test that we can get OnCandidatesAllocationDone callback when all the ports
476 // are disabled. 480 // are disabled.
477 TEST_F(PortAllocatorTest, TestDisableAllPorts) { 481 TEST_F(PortAllocatorTest, TestDisableAllPorts) {
478 AddInterface(kClientAddr); 482 AddInterface(kClientAddr);
479 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); 483 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP));
480 session_->set_flags(cricket::PORTALLOCATOR_DISABLE_UDP | 484 session_->set_flags(cricket::PORTALLOCATOR_DISABLE_UDP |
481 cricket::PORTALLOCATOR_DISABLE_STUN | 485 cricket::PORTALLOCATOR_DISABLE_STUN |
482 cricket::PORTALLOCATOR_DISABLE_RELAY | 486 cricket::PORTALLOCATOR_DISABLE_RELAY |
483 cricket::PORTALLOCATOR_DISABLE_TCP); 487 cricket::PORTALLOCATOR_DISABLE_TCP);
484 session_->StartGettingPorts(); 488 session_->StartGettingPorts();
(...skipping 17 matching lines...) Expand all
502 EXPECT_PRED5(CheckCandidate, candidates_[2], 506 EXPECT_PRED5(CheckCandidate, candidates_[2],
503 cricket::ICE_CANDIDATE_COMPONENT_RTP, "relay", "tcp", kRelayTcpIntAddr); 507 cricket::ICE_CANDIDATE_COMPONENT_RTP, "relay", "tcp", kRelayTcpIntAddr);
504 EXPECT_PRED5(CheckCandidate, candidates_[3], 508 EXPECT_PRED5(CheckCandidate, candidates_[3],
505 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "tcp", kClientAddr); 509 cricket::ICE_CANDIDATE_COMPONENT_RTP, "local", "tcp", kClientAddr);
506 EXPECT_PRED5(CheckCandidate, candidates_[4], 510 EXPECT_PRED5(CheckCandidate, candidates_[4],
507 cricket::ICE_CANDIDATE_COMPONENT_RTP, 511 cricket::ICE_CANDIDATE_COMPONENT_RTP,
508 "relay", "ssltcp", kRelaySslTcpIntAddr); 512 "relay", "ssltcp", kRelaySslTcpIntAddr);
509 EXPECT_TRUE(candidate_allocation_done_); 513 EXPECT_TRUE(candidate_allocation_done_);
510 } 514 }
511 515
516 #endif // if !defined(THREAD_SANITIZER)
517
512 // Test that we don't crash or malfunction if we can't create UDP sockets or 518 // Test that we don't crash or malfunction if we can't create UDP sockets or
513 // listen on TCP sockets. We still give out a local TCP address, since 519 // listen on TCP sockets. We still give out a local TCP address, since
514 // apparently this is needed for the remote side to accept our connection. 520 // apparently this is needed for the remote side to accept our connection.
515 TEST_F(PortAllocatorTest, TestGetAllPortsNoUdpSocketsNoTcpListen) { 521 TEST_F(PortAllocatorTest, TestGetAllPortsNoUdpSocketsNoTcpListen) {
516 AddInterface(kClientAddr); 522 AddInterface(kClientAddr);
517 fss_->set_udp_sockets_enabled(false); 523 fss_->set_udp_sockets_enabled(false);
518 fss_->set_tcp_listen_enabled(false); 524 fss_->set_tcp_listen_enabled(false);
519 EXPECT_TRUE(CreateSession(1)); 525 EXPECT_TRUE(CreateSession(1));
520 session_->StartGettingPorts(); 526 session_->StartGettingPorts();
521 ASSERT_EQ_WAIT(5U, candidates_.size(), kDefaultAllocationTimeout); 527 ASSERT_EQ_WAIT(5U, candidates_.size(), kDefaultAllocationTimeout);
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); 1045 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP));
1040 session_->StartGettingPorts(); 1046 session_->StartGettingPorts();
1041 ASSERT_EQ_WAIT(7U, candidates_.size(), kDefaultAllocationTimeout); 1047 ASSERT_EQ_WAIT(7U, candidates_.size(), kDefaultAllocationTimeout);
1042 EXPECT_EQ(4U, ports_.size()); 1048 EXPECT_EQ(4U, ports_.size());
1043 1049
1044 auto it = ports_.begin(); 1050 auto it = ports_.begin();
1045 for (; it != ports_.end(); ++it) { 1051 for (; it != ports_.end(); ++it) {
1046 (reinterpret_cast<cricket::Port*>(*it))->Destroy(); 1052 (reinterpret_cast<cricket::Port*>(*it))->Destroy();
1047 } 1053 }
1048 } 1054 }
OLDNEW
« 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