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

Unified Diff: webrtc/modules/pacing/paced_sender_unittest.cc

Issue 2746153002: Return a long timeout value from TimeUntilNextProcess when the PacedSender is paused (Closed)
Patch Set: Address comments Created 3 years, 9 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/pacing/paced_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/paced_sender_unittest.cc
diff --git a/webrtc/modules/pacing/paced_sender_unittest.cc b/webrtc/modules/pacing/paced_sender_unittest.cc
index 6c5e3df2809733d967f5b6124ad3b4802ab4ae81..62359785ae1e764eb98588179fef0fd7fc2e45a9 100644
--- a/webrtc/modules/pacing/paced_sender_unittest.cc
+++ b/webrtc/modules/pacing/paced_sender_unittest.cc
@@ -634,7 +634,9 @@ TEST_F(PacedSenderTest, Pause) {
for (int i = 0; i < 10; ++i) {
clock_.AdvanceTimeMilliseconds(5);
- EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
+ // TimeUntilNextProcess must not return 0 when paused. If it does,
+ // we risk running a busy loop, so ideally it should return a large value.
+ EXPECT_GE(send_bucket_->TimeUntilNextProcess(), 1000);
send_bucket_->Process();
}
« no previous file with comments | « webrtc/modules/pacing/paced_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698