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

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: Update BUILD.gn 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
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..7a1833edf4783f2d3b66cce7a4208479bc960d51 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_LT(1000, send_bucket_->TimeUntilNextProcess());
stefan-webrtc 2017/03/15 12:43:18 EXPECT_GT(..., 1000), please... I can't read this.
tommi 2017/03/15 13:42:56 haha, yeah, it looks pretty terrible :) In genera
send_bucket_->Process();
}
« webrtc/modules/pacing/paced_sender.cc ('K') | « webrtc/modules/pacing/paced_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698