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

Unified Diff: webrtc/modules/congestion_controller/probe_controller_unittest.cc

Issue 2269873002: Avoid cluster set up at max bitrate at start (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup
Patch Set: Fix nit Created 4 years, 3 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
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/probe_controller_unittest.cc
diff --git a/webrtc/modules/congestion_controller/probe_controller_unittest.cc b/webrtc/modules/congestion_controller/probe_controller_unittest.cc
index 693277552c6e0d9c1e506fa0021096dda5e2dba9..9e01660aa2a796c66e45c7cb0ad846c83c630772 100644
--- a/webrtc/modules/congestion_controller/probe_controller_unittest.cc
+++ b/webrtc/modules/congestion_controller/probe_controller_unittest.cc
@@ -29,6 +29,8 @@ constexpr int kMinBitrateBps = 100;
constexpr int kStartBitrateBps = 300;
constexpr int kMaxBitrateBps = 1000;
+constexpr int kExponentialProbingTimeoutMs = 5000;
+
} // namespace
class ProbeControllerTest : public ::testing::Test {
@@ -53,9 +55,10 @@ TEST_F(ProbeControllerTest, InitiatesProbingOnMaxBitrateIncrease) {
EXPECT_CALL(pacer_, CreateProbeCluster(_, _)).Times(AtLeast(2));
probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
kMaxBitrateBps);
- clock_.AdvanceTimeMilliseconds(25);
-
+ // Long enough to time out exponential probing.
+ clock_.AdvanceTimeMilliseconds(kExponentialProbingTimeoutMs);
probe_controller_->SetEstimatedBitrate(kStartBitrateBps);
+
EXPECT_CALL(pacer_, CreateProbeCluster(kMaxBitrateBps + 100, _));
probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
kMaxBitrateBps + 100);
@@ -73,7 +76,7 @@ TEST_F(ProbeControllerTest, TestExponentialProbingTimeout) {
kMaxBitrateBps);
// Advance far enough to cause a time out in waiting for probing result.
- clock_.AdvanceTimeMilliseconds(5000);
+ clock_.AdvanceTimeMilliseconds(kExponentialProbingTimeoutMs);
EXPECT_CALL(pacer_, CreateProbeCluster(2 * 1800, _)).Times(0);
probe_controller_->SetEstimatedBitrate(1800);
}
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698