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

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

Issue 2613543003: Fix BitrateProber to match the requested bitrate more precisely (Closed)
Patch Set: Limit number of retries Created 3 years, 11 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/bitrate_prober_unittest.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 fc80a9881349af92e35c06ed51941a35e404a391..cde5fd1febe2a5d357d911b20f8f65eba87366a4 100644
--- a/webrtc/modules/pacing/paced_sender_unittest.cc
+++ b/webrtc/modules/pacing/paced_sender_unittest.cc
@@ -828,6 +828,7 @@ TEST_F(PacedSenderTest, ProbingWithInsertedPackets) {
kFirstClusterBps, kBitrateProbingError);
EXPECT_EQ(0, packet_sender.padding_sent());
+ clock_.AdvanceTimeMilliseconds(send_bucket_->TimeUntilNextProcess());
start = clock_.TimeInMilliseconds();
while (packet_sender.packets_sent() < 10) {
int time_until_process = send_bucket_->TimeUntilNextProcess();
@@ -836,9 +837,9 @@ TEST_F(PacedSenderTest, ProbingWithInsertedPackets) {
}
packets_sent = packet_sender.packets_sent() - packets_sent;
// Validate second cluster bitrate.
- EXPECT_NEAR(
- packets_sent * kPacketSize * 8000 / (clock_.TimeInMilliseconds() - start),
- kSecondClusterBps, kBitrateProbingError);
+ EXPECT_NEAR((packets_sent - 1) * kPacketSize * 8000 /
+ (clock_.TimeInMilliseconds() - start),
+ kSecondClusterBps, kBitrateProbingError);
}
TEST_F(PacedSenderTest, ProbingWithPaddingSupport) {
« no previous file with comments | « webrtc/modules/pacing/bitrate_prober_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698