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

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

Issue 1048493002: Remove the using_pacing argument from QuicSentPacketManager::SetFromConfig because it's always true. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/tcp_cubic_sender.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/tcp_cubic_sender_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_test.cc b/net/quic/congestion_control/tcp_cubic_sender_test.cc
index fd30ef03caf5e736764c90187f856059ed1cf423..aa146efc81d053f9d8e97af44bda9dc7a967e8d2 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
@@ -207,52 +207,6 @@ TEST_F(TcpCubicSenderTest, ExponentialSlowStart) {
sender_->BandwidthEstimate());
}
-TEST_F(TcpCubicSenderTest, SlowStartAckTrain) {
- sender_->SetNumEmulatedConnections(1);
- EXPECT_EQ(kMaxTcpCongestionWindow * kDefaultTCPMSS,
- sender_->GetSlowStartThreshold());
-
- // Make sure that we fall out of slow start when we send ACK train longer
- // than half the RTT, in this test case 30ms, which is more than 30 calls to
- // Ack2Packets in one round.
- // Since we start at 10 packet first round will be 5 second round 10 etc
- // Hence we should pass 30 at 65 = 5 + 10 + 20 + 30
- const int kNumberOfAcks = 65;
- for (int i = 0; i < kNumberOfAcks; ++i) {
- // Send our full send window.
- SendAvailableSendWindow();
- AckNPackets(2);
- }
- QuicByteCount expected_send_window =
- kDefaultWindowTCP + (kDefaultTCPMSS * 2 * kNumberOfAcks);
- EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow());
-
- // We should now have fallen out of slow start.
- // Testing Reno phase.
- // We should need 140(65*2+10) ACK:ed packets before increasing window by
- // one.
- for (int i = 0; i < 69; ++i) {
- SendAvailableSendWindow();
- AckNPackets(2);
- EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow());
- }
- SendAvailableSendWindow();
- AckNPackets(2);
- QuicByteCount expected_ss_tresh = expected_send_window;
- expected_send_window += kDefaultTCPMSS;
- EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow());
- EXPECT_EQ(expected_ss_tresh, sender_->GetSlowStartThreshold());
- EXPECT_EQ(140u, sender_->slowstart_threshold());
-
- // Now RTO and ensure slow start gets reset.
- EXPECT_TRUE(sender_->hybrid_slow_start().started());
- sender_->OnRetransmissionTimeout(true);
- EXPECT_FALSE(sender_->hybrid_slow_start().started());
- EXPECT_EQ(2 * kDefaultTCPMSS, sender_->GetCongestionWindow());
- EXPECT_EQ(expected_send_window / 2 / kDefaultTCPMSS,
- sender_->slowstart_threshold());
-}
-
TEST_F(TcpCubicSenderTest, SlowStartPacketLoss) {
sender_->SetNumEmulatedConnections(1);
const int kNumberOfAcks = 10;
@@ -566,8 +520,7 @@ TEST_F(TcpCubicSenderTest, ConfigureInitialWindow) {
QuicTagVector options;
options.push_back(kIW10);
QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
- sender_->SetFromConfig(config, Perspective::IS_SERVER,
- /* using_pacing= */ false);
+ sender_->SetFromConfig(config, Perspective::IS_SERVER);
EXPECT_EQ(10u, sender_->congestion_window());
}
@@ -578,21 +531,11 @@ TEST_F(TcpCubicSenderTest, ConfigureMinimumWindow) {
QuicTagVector options;
options.push_back(kMIN1);
QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
- sender_->SetFromConfig(config, Perspective::IS_SERVER,
- /* using_pacing= */ false);
+ sender_->SetFromConfig(config, Perspective::IS_SERVER);
sender_->OnRetransmissionTimeout(true);
EXPECT_EQ(1u, sender_->congestion_window());
}
-TEST_F(TcpCubicSenderTest, DisableAckTrainDetectionWithPacing) {
- EXPECT_TRUE(sender_->hybrid_slow_start().ack_train_detection());
-
- QuicConfig config;
- sender_->SetFromConfig(config, Perspective::IS_SERVER,
- /* using_pacing= */ true);
- EXPECT_FALSE(sender_->hybrid_slow_start().ack_train_detection());
-}
-
TEST_F(TcpCubicSenderTest, 2ConnectionCongestionAvoidanceAtEndOfRecovery) {
sender_->SetNumEmulatedConnections(2);
// Ack 10 packets in 5 acks to raise the CWND to 20.
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698