From 8271a7f6d7da944389ae676cd279bc4a81c49c6e Mon Sep 17 00:00:00 2001 From: deadbeef Date: Tue, 31 May 2016 16:27:10 -0700 Subject: [PATCH] Increasing a timeout for TestGetAllPortsNoUdpAllowed. The timeout was 3 seconds, but on one bot (TSan) it took 4.3 seconds. NOTRY=True TBR=pthatcher@webrtc.org Review-Url: https://codereview.webrtc.org/2021413002 Cr-Commit-Position: refs/heads/master@{#12978} --- webrtc/p2p/client/basicportallocator_unittest.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webrtc/p2p/client/basicportallocator_unittest.cc b/webrtc/p2p/client/basicportallocator_unittest.cc index 0bc68b2f03..0eaa49e4d8 100644 --- a/webrtc/p2p/client/basicportallocator_unittest.cc +++ b/webrtc/p2p/client/basicportallocator_unittest.cc @@ -916,15 +916,17 @@ TEST_F(BasicPortAllocatorTest, TestGetAllPortsNoUdpAllowed) { EXPECT_PRED4(HasCandidate, candidates_, "local", "tcp", kClientAddr); // RelayPort connection timeout is 3sec. TCP connection with RelayServer // will be tried after 3 seconds. - EXPECT_EQ_WAIT(6U, candidates_.size(), 4000); + // TODO(deadbeef): Use simulated clock here, waiting for exactly 3 seconds. + EXPECT_EQ_WAIT(6U, candidates_.size(), kStunTimeoutMs); EXPECT_EQ(3U, ports_.size()); EXPECT_PRED4(HasCandidate, candidates_, "relay", "udp", kRelayUdpIntAddr); EXPECT_PRED4(HasCandidate, candidates_, "relay", "tcp", kRelayTcpIntAddr); EXPECT_PRED4(HasCandidate, candidates_, "relay", "ssltcp", kRelaySslTcpIntAddr); EXPECT_PRED4(HasCandidate, candidates_, "relay", "udp", kRelayUdpExtAddr); - // Stun Timeout is 9sec. - EXPECT_TRUE_WAIT(candidate_allocation_done_, 9000); + // Stun Timeout is 9.5sec. + // TODO(deadbeef): Use simulated clock here, waiting exactly 6.5 seconds. + EXPECT_TRUE_WAIT(candidate_allocation_done_, kStunTimeoutMs); } TEST_F(BasicPortAllocatorTest, TestCandidatePriorityOfMultipleInterfaces) {