Index: webrtc/p2p/client/basicportallocator_unittest.cc |
diff --git a/webrtc/p2p/client/basicportallocator_unittest.cc b/webrtc/p2p/client/basicportallocator_unittest.cc |
index 4696f2399c761942f37d6a51538e1c9486d82567..bfdba5b8e5ba31ab97f8d304d36c86e1720b9680 100644 |
--- a/webrtc/p2p/client/basicportallocator_unittest.cc |
+++ b/webrtc/p2p/client/basicportallocator_unittest.cc |
@@ -1611,6 +1611,7 @@ TEST_F(BasicPortAllocatorTest, TestStopGettingPorts) { |
// After stopping getting ports, adding a new interface will not start |
// getting ports again. |
+ allocator_->set_step_delay(kMinimumStepDelay); |
candidates_.clear(); |
ports_.clear(); |
candidate_allocation_done_ = false; |
@@ -1628,17 +1629,18 @@ TEST_F(BasicPortAllocatorTest, TestClearGettingPorts) { |
ASSERT_EQ_WAIT(2U, candidates_.size(), 1000); |
EXPECT_EQ(2U, ports_.size()); |
session_->ClearGettingPorts(); |
- WAIT(candidate_allocation_done_, 1000); |
- EXPECT_FALSE(candidate_allocation_done_); |
+ EXPECT_TRUE_WAIT(candidate_allocation_done_, 1000); |
// After clearing getting ports, adding a new interface will start getting |
// ports again. |
+ allocator_->set_step_delay(kMinimumStepDelay); |
candidates_.clear(); |
ports_.clear(); |
candidate_allocation_done_ = false; |
network_manager_.AddInterface(kClientAddr2); |
ASSERT_EQ_WAIT(2U, candidates_.size(), 1000); |
EXPECT_EQ(2U, ports_.size()); |
+ EXPECT_TRUE_WAIT(candidate_allocation_done_, kDefaultAllocationTimeout); |
} |
// Test that the ports and candidates are updated with new ufrag/pwd/etc. when |