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

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

Issue 241563002: Fix to ensure hybrid slow start is reset when QUIC's retransmission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/hybrid_slow_start.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/hybrid_slow_start_test.cc
diff --git a/net/quic/congestion_control/hybrid_slow_start_test.cc b/net/quic/congestion_control/hybrid_slow_start_test.cc
index ee572bd989b15e64c03f9fb1d88a3744844b48cf..566a56049374ec4c178a6869b2cd06441b301790 100644
--- a/net/quic/congestion_control/hybrid_slow_start_test.cc
+++ b/net/quic/congestion_control/hybrid_slow_start_test.cc
@@ -61,8 +61,7 @@ TEST_F(HybridSlowStartTest, AckTrain) {
slowStart_->Reset(end_sequence_number);
do {
clock_.AdvanceTime(one_ms_);
- slowStart_->Update(rtt_, rtt_);
- EXPECT_FALSE(slowStart_->Exit());
+ EXPECT_FALSE(slowStart_->UpdateAndMaybeExit(rtt_, rtt_));
} while (!slowStart_->IsEndOfRound(sequence_number++));
end_sequence_number *= 2; // Exponential growth.
}
@@ -70,12 +69,10 @@ TEST_F(HybridSlowStartTest, AckTrain) {
for (int n = 0; n < 29 && !slowStart_->IsEndOfRound(sequence_number++); ++n) {
clock_.AdvanceTime(one_ms_);
- slowStart_->Update(rtt_, rtt_);
- EXPECT_FALSE(slowStart_->Exit());
+ EXPECT_FALSE(slowStart_->UpdateAndMaybeExit(rtt_, rtt_));
}
clock_.AdvanceTime(one_ms_);
- slowStart_->Update(rtt_, rtt_);
- EXPECT_TRUE(slowStart_->Exit());
+ EXPECT_TRUE(slowStart_->UpdateAndMaybeExit(rtt_, rtt_));
}
TEST_F(HybridSlowStartTest, Delay) {
@@ -89,19 +86,18 @@ TEST_F(HybridSlowStartTest, Delay) {
// Will not trigger since our lowest RTT in our burst is the same as the long
// term RTT provided.
for (int n = 0; n < kHybridStartMinSamples; ++n) {
- slowStart_->Update(rtt_.Add(QuicTime::Delta::FromMilliseconds(n)), rtt_);
- EXPECT_FALSE(slowStart_->Exit());
+ EXPECT_FALSE(slowStart_->UpdateAndMaybeExit(
+ rtt_.Add(QuicTime::Delta::FromMilliseconds(n)), rtt_));
}
slowStart_->Reset(end_sequence_number++);
for (int n = 1; n < kHybridStartMinSamples; ++n) {
- slowStart_->Update(rtt_.Add(QuicTime::Delta::FromMilliseconds(n + 4)),
- rtt_);
- EXPECT_FALSE(slowStart_->Exit());
+ EXPECT_FALSE(slowStart_->UpdateAndMaybeExit(rtt_.Add(
+ QuicTime::Delta::FromMilliseconds(n + 4)), rtt_));
}
// Expect to trigger since all packets in this burst was above the long term
// RTT provided.
- slowStart_->Update(rtt_.Add(QuicTime::Delta::FromMilliseconds(4)), rtt_);
- EXPECT_TRUE(slowStart_->Exit());
+ EXPECT_TRUE(slowStart_->UpdateAndMaybeExit(rtt_.Add(
+ QuicTime::Delta::FromMilliseconds(4)), rtt_));
}
} // namespace test
« no previous file with comments | « net/quic/congestion_control/hybrid_slow_start.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