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

Unified Diff: net/quic/congestion_control/pacing_sender_test.cc

Issue 397513002: Fix a newly introduced bug in QUIC's PacingSender where burst_tokens_ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/pacing_sender_test.cc
diff --git a/net/quic/congestion_control/pacing_sender_test.cc b/net/quic/congestion_control/pacing_sender_test.cc
index ba867b5ff16b8faecbd2e71878a5142478ba6338..1d1fe8f548ff989a4dfe8003e25f391c4f67b2f6 100644
--- a/net/quic/congestion_control/pacing_sender_test.cc
+++ b/net/quic/congestion_control/pacing_sender_test.cc
@@ -237,10 +237,17 @@ TEST_F(PacingSenderTest, InitialBurst) {
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
CheckPacketIsSentImmediately();
- // Now reduce bytes in flight back to 0 by and ensure another burst of 10 can
- // be sent.
- EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, 0, _, _));
- pacing_sender_->OnCongestionEvent(true, 0, empty_map, empty_map);
+ // Next time TimeUntilSend is called with no bytes in flight, the tokens
+ // should be refilled and there should be no delay.
+ EXPECT_CALL(*mock_sender_,
+ TimeUntilSend(clock_.Now(),
+ 0,
+ HAS_RETRANSMITTABLE_DATA)).
+ WillOnce(Return(zero_time_));
+ EXPECT_EQ(zero_time_,
+ pacing_sender_->TimeUntilSend(clock_.Now(),
+ 0,
+ HAS_RETRANSMITTABLE_DATA));
for (int i = 0 ; i < 10; ++i) {
CheckPacketIsSentImmediately();
}
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698