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

Unified Diff: net/quic/congestion_control/tcp_cubic_bytes_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
Index: net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc b/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
index 63b5232ad5e5efdc66f48b65127d50a3f3e5e28f..a4bbb433b84cf7f0f9b995b6019171b2b736fb2e 100644
--- a/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc
@@ -186,48 +186,6 @@ TEST_F(TcpCubicBytesSenderTest, ExponentialSlowStart) {
sender_->BandwidthEstimate());
}
-TEST_F(TcpCubicBytesSenderTest, SlowStartAckTrain) {
- sender_->SetNumEmulatedConnections(1);
-
- // 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());
-
- // 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, sender_->GetSlowStartThreshold());
-}
-
TEST_F(TcpCubicBytesSenderTest, SlowStartPacketLoss) {
sender_->SetNumEmulatedConnections(1);
const int kNumberOfAcks = 10;
@@ -480,20 +438,10 @@ TEST_F(TcpCubicBytesSenderTest, ConfigureMaxInitialWindow) {
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 * kDefaultTCPMSS, sender_->GetCongestionWindow());
}
-TEST_F(TcpCubicBytesSenderTest, 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(TcpCubicBytesSenderTest, 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_bytes_sender.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698