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

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

Issue 667763003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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') | net/quic/congestion_control/rtt_stats.h » ('j') | 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 f887c542fd689fd98081c9ecb72cdd65c9224ea5..0be0b0aac017466ee522ff1e3b71d7766d08d028 100644
--- a/net/quic/congestion_control/pacing_sender_test.cc
+++ b/net/quic/congestion_control/pacing_sender_test.cc
@@ -134,14 +134,10 @@ TEST_F(PacingSenderTest, SendNow) {
}
TEST_F(PacingSenderTest, VariousSending) {
- // Start the test in slow start.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(true));
-
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1))));
// Now update the RTT and verify that packets are actually paced.
EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytesInFlight, _, _));
@@ -204,14 +200,10 @@ TEST_F(PacingSenderTest, VariousSending) {
}
TEST_F(PacingSenderTest, CongestionAvoidanceSending) {
- // Start the test in congestion avoidance.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(false));
-
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize * 1.25, QuicTime::Delta::FromMilliseconds(2))));
// Now update the RTT and verify that packets are actually paced.
EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytesInFlight, _, _));
@@ -272,14 +264,11 @@ TEST_F(PacingSenderTest, InitialBurst) {
pacing_sender_.reset(new PacingSender(mock_sender_,
QuicTime::Delta::FromMilliseconds(1),
10));
- // Start the test in slow start.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(true));
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1))));
// Update the RTT and verify that the first 10 packets aren't paced.
EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytesInFlight, _, _));
@@ -330,14 +319,11 @@ TEST_F(PacingSenderTest, InitialBurstNoRttMeasurement) {
pacing_sender_.reset(new PacingSender(mock_sender_,
QuicTime::Delta::FromMilliseconds(1),
10));
- // Start the test in slow start.
- EXPECT_CALL(*mock_sender_, InSlowStart()).WillRepeatedly(Return(true));
- // Configure bandwith of 1 packet per 2 ms, for which the pacing rate
- // will be 1 packet per 1 ms.
- EXPECT_CALL(*mock_sender_, BandwidthEstimate())
+ // Configure pacing rate of 1 packet per 1 ms.
+ EXPECT_CALL(*mock_sender_, PacingRate())
.WillRepeatedly(Return(QuicBandwidth::FromBytesAndTimeDelta(
- kMaxPacketSize, QuicTime::Delta::FromMilliseconds(2))));
+ kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1))));
// Send 10 packets, and verify that they are not paced.
for (int i = 0 ; i < kInitialBurstPackets; ++i) {
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | net/quic/congestion_control/rtt_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698