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

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

Issue 972033002: Change QUIC's PrrSender::TimeUntilSend to accept bytes instead of packets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Discard_acks_87419283
Patch Set: Created 5 years, 10 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/prr_sender.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/prr_sender_test.cc
diff --git a/net/quic/congestion_control/prr_sender_test.cc b/net/quic/congestion_control/prr_sender_test.cc
index 7a42bd5635eb38d051f8e8eda95a16e4f2a68707..ed8397fb50e21443efe1ad00b60f2e7d3633e87b 100644
--- a/net/quic/congestion_control/prr_sender_test.cc
+++ b/net/quic/congestion_control/prr_sender_test.cc
@@ -35,13 +35,13 @@ TEST_F(PrrSenderTest, SingleLossResultsInSendOnEveryOtherAck) {
bytes_in_flight -= kMaxSegmentSize;
EXPECT_EQ(QuicTime::Delta::Zero(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// Send retransmission.
prr.OnPacketSent(kMaxSegmentSize);
// PRR shouldn't allow sending any more packets.
EXPECT_EQ(QuicTime::Delta::Infinite(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// One packet is lost, and one ack was consumed above. PRR now paces
// transmissions through the remaining 48 acks. PRR will alternatively
@@ -52,13 +52,13 @@ TEST_F(PrrSenderTest, SingleLossResultsInSendOnEveryOtherAck) {
bytes_in_flight -= kMaxSegmentSize;
EXPECT_EQ(QuicTime::Delta::Infinite(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// Ack another packet. PRR should now allow sending a packet in response.
prr.OnPacketAcked(kMaxSegmentSize);
bytes_in_flight -= kMaxSegmentSize;
EXPECT_EQ(QuicTime::Delta::Zero(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// Send a packet in response.
prr.OnPacketSent(kMaxSegmentSize);
bytes_in_flight += kMaxSegmentSize;
@@ -73,7 +73,7 @@ TEST_F(PrrSenderTest, SingleLossResultsInSendOnEveryOtherAck) {
bytes_in_flight -= kMaxSegmentSize;
EXPECT_EQ(QuicTime::Delta::Zero(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// Send a packet in response, since PRR allows it.
prr.OnPacketSent(kMaxSegmentSize);
bytes_in_flight += kMaxSegmentSize;
@@ -83,7 +83,7 @@ TEST_F(PrrSenderTest, SingleLossResultsInSendOnEveryOtherAck) {
EXPECT_EQ(congestion_window, bytes_in_flight);
EXPECT_EQ(QuicTime::Delta::Infinite(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
}
}
@@ -106,7 +106,7 @@ TEST_F(PrrSenderTest, BurstLossResultsInSlowStart) {
for (int j = 0; j < 2; ++j) {
EXPECT_EQ(QuicTime::Delta::Zero(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// Send a packet in response.
prr.OnPacketSent(kMaxSegmentSize);
bytes_in_flight += kMaxSegmentSize;
@@ -114,7 +114,7 @@ TEST_F(PrrSenderTest, BurstLossResultsInSlowStart) {
// PRR should allow no more than 2 packets in response to an ack.
EXPECT_EQ(QuicTime::Delta::Infinite(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
}
// Out of SSRB mode, PRR allows one send in response to each ack.
@@ -123,7 +123,7 @@ TEST_F(PrrSenderTest, BurstLossResultsInSlowStart) {
bytes_in_flight -= kMaxSegmentSize;
EXPECT_EQ(QuicTime::Delta::Zero(),
prr.TimeUntilSend(congestion_window, bytes_in_flight,
- ssthresh_after_loss));
+ ssthresh_after_loss * kMaxSegmentSize));
// Send a packet in response.
prr.OnPacketSent(kMaxSegmentSize);
bytes_in_flight += kMaxSegmentSize;
« no previous file with comments | « net/quic/congestion_control/prr_sender.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698