aboutsummaryrefslogtreecommitdiff
path: root/webrtc
diff options
context:
space:
mode:
authorTaylor Brandstetter <deadbeef@webrtc.org>2015-12-29 12:51:12 -0800
committerTaylor Brandstetter <deadbeef@webrtc.org>2015-12-29 20:51:21 +0000
commite86e15b2a2ee208e2d8edbb1c2d73274d9b8aec7 (patch)
tree27d82255fd97ac973f347dbb48f74e2b2310d9d7 /webrtc
parent355113a7029c6b5edd8628f31538c4a17dffac0d (diff)
downloadwebrtc-e86e15b2a2ee208e2d8edbb1c2d73274d9b8aec7.tar.gz
Increasing timeout for TestResolverShutdown.
getaddrinfo() seems to take longer than a second occasionally. BUG=webrtc:5191 R=pthatcher@webrtc.org Review URL: https://codereview.webrtc.org/1536563005 . Cr-Commit-Position: refs/heads/master@{#11138}
Diffstat (limited to 'webrtc')
-rw-r--r--webrtc/p2p/base/turnport_unittest.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/webrtc/p2p/base/turnport_unittest.cc b/webrtc/p2p/base/turnport_unittest.cc
index 57207486f8..eac3474d26 100644
--- a/webrtc/p2p/base/turnport_unittest.cc
+++ b/webrtc/p2p/base/turnport_unittest.cc
@@ -975,6 +975,10 @@ TEST_F(TurnPortTest, DISABLED_TestTurnTCPReleaseAllocation) {
// This test verifies any FD's are not leaked after TurnPort is destroyed.
// https://code.google.com/p/webrtc/issues/detail?id=2651
#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
+// 1 second is not always enough for getaddrinfo().
+// See: https://bugs.chromium.org/p/webrtc/issues/detail?id=5191
+static const unsigned int kResolverTimeout = 10000;
+
TEST_F(TurnPortTest, TestResolverShutdown) {
turn_server_.AddInternalSocket(kTurnUdpIPv6IntAddr, cricket::PROTO_UDP);
int last_fd_count = GetFDCount();
@@ -983,7 +987,7 @@ TEST_F(TurnPortTest, TestResolverShutdown) {
cricket::ProtocolAddress(rtc::SocketAddress(
"www.google.invalid", 3478), cricket::PROTO_UDP));
turn_port_->PrepareAddress();
- ASSERT_TRUE_WAIT(turn_error_, kTimeout);
+ ASSERT_TRUE_WAIT(turn_error_, kResolverTimeout);
EXPECT_TRUE(turn_port_->Candidates().empty());
turn_port_.reset();
rtc::Thread::Current()->Post(this, MSG_TESTFINISH);