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

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

Issue 2021413002: Increasing a timeout for TestGetAllPortsNoUdpAllowed. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 fss_->AddRule(false, rtc::FP_UDP, rtc::FD_ANY, kClientAddr); 909 fss_->AddRule(false, rtc::FP_UDP, rtc::FD_ANY, kClientAddr);
910 AddInterface(kClientAddr); 910 AddInterface(kClientAddr);
911 EXPECT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP)); 911 EXPECT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP));
912 session_->StartGettingPorts(); 912 session_->StartGettingPorts();
913 EXPECT_EQ_WAIT(2U, candidates_.size(), kDefaultAllocationTimeout); 913 EXPECT_EQ_WAIT(2U, candidates_.size(), kDefaultAllocationTimeout);
914 EXPECT_EQ(2U, ports_.size()); 914 EXPECT_EQ(2U, ports_.size());
915 EXPECT_PRED4(HasCandidate, candidates_, "local", "udp", kClientAddr); 915 EXPECT_PRED4(HasCandidate, candidates_, "local", "udp", kClientAddr);
916 EXPECT_PRED4(HasCandidate, candidates_, "local", "tcp", kClientAddr); 916 EXPECT_PRED4(HasCandidate, candidates_, "local", "tcp", kClientAddr);
917 // RelayPort connection timeout is 3sec. TCP connection with RelayServer 917 // RelayPort connection timeout is 3sec. TCP connection with RelayServer
918 // will be tried after 3 seconds. 918 // will be tried after 3 seconds.
919 EXPECT_EQ_WAIT(6U, candidates_.size(), 4000); 919 // TODO(deadbeef): Use simulated clock here, waiting for exactly 3 seconds.
920 EXPECT_EQ_WAIT(6U, candidates_.size(), kStunTimeoutMs);
920 EXPECT_EQ(3U, ports_.size()); 921 EXPECT_EQ(3U, ports_.size());
921 EXPECT_PRED4(HasCandidate, candidates_, "relay", "udp", kRelayUdpIntAddr); 922 EXPECT_PRED4(HasCandidate, candidates_, "relay", "udp", kRelayUdpIntAddr);
922 EXPECT_PRED4(HasCandidate, candidates_, "relay", "tcp", kRelayTcpIntAddr); 923 EXPECT_PRED4(HasCandidate, candidates_, "relay", "tcp", kRelayTcpIntAddr);
923 EXPECT_PRED4(HasCandidate, candidates_, "relay", "ssltcp", 924 EXPECT_PRED4(HasCandidate, candidates_, "relay", "ssltcp",
924 kRelaySslTcpIntAddr); 925 kRelaySslTcpIntAddr);
925 EXPECT_PRED4(HasCandidate, candidates_, "relay", "udp", kRelayUdpExtAddr); 926 EXPECT_PRED4(HasCandidate, candidates_, "relay", "udp", kRelayUdpExtAddr);
926 // Stun Timeout is 9sec. 927 // Stun Timeout is 9.5sec.
927 EXPECT_TRUE_WAIT(candidate_allocation_done_, 9000); 928 // TODO(deadbeef): Use simulated clock here, waiting exactly 6.5 seconds.
929 EXPECT_TRUE_WAIT(candidate_allocation_done_, kStunTimeoutMs);
928 } 930 }
929 931
930 TEST_F(BasicPortAllocatorTest, TestCandidatePriorityOfMultipleInterfaces) { 932 TEST_F(BasicPortAllocatorTest, TestCandidatePriorityOfMultipleInterfaces) {
931 AddInterface(kClientAddr); 933 AddInterface(kClientAddr);
932 AddInterface(kClientAddr2); 934 AddInterface(kClientAddr2);
933 // Allocating only host UDP ports. This is done purely for testing 935 // Allocating only host UDP ports. This is done purely for testing
934 // convenience. 936 // convenience.
935 allocator().set_flags(PORTALLOCATOR_DISABLE_TCP | PORTALLOCATOR_DISABLE_STUN | 937 allocator().set_flags(PORTALLOCATOR_DISABLE_TCP | PORTALLOCATOR_DISABLE_STUN |
936 PORTALLOCATOR_DISABLE_RELAY); 938 PORTALLOCATOR_DISABLE_RELAY);
937 EXPECT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP)); 939 EXPECT_TRUE(CreateSession(ICE_CANDIDATE_COMPONENT_RTP));
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 for (const Candidate& candidate : candidates) { 1483 for (const Candidate& candidate : candidates) {
1482 // Expect only relay candidates now that the filter is applied. 1484 // Expect only relay candidates now that the filter is applied.
1483 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); 1485 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type());
1484 // Expect that the raddr is emptied due to the CF_RELAY filter. 1486 // Expect that the raddr is emptied due to the CF_RELAY filter.
1485 EXPECT_EQ(candidate.related_address(), 1487 EXPECT_EQ(candidate.related_address(),
1486 rtc::EmptySocketAddressWithFamily(candidate.address().family())); 1488 rtc::EmptySocketAddressWithFamily(candidate.address().family()));
1487 } 1489 }
1488 } 1490 }
1489 1491
1490 } // namespace cricket 1492 } // namespace cricket
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