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

Unified Diff: webrtc/p2p/client/basicportallocator_unittest.cc

Issue 2124283003: Fixing inconsistency with behavior of `ClearGettingPorts`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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
« webrtc/p2p/client/basicportallocator.cc ('K') | « webrtc/p2p/client/basicportallocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698