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

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

Issue 447083002: Default socket receive buffer to 256K bytes and remove unnecessary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Include_socket_receive_buffer_72334240
Patch Set: Created 6 years, 4 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') | no next file » | 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 d80c4f80a779221693ad89dacce2e8198fed0b13..cc52da6c7d244d9917ff64b2344730c7656a2e5c 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_test.cc
@@ -131,16 +131,12 @@ class TcpCubicSenderTest : public ::testing::Test {
};
TEST_F(TcpCubicSenderTest, SimpleSender) {
- QuicCongestionFeedbackFrame feedback;
// At startup make sure we are at the default.
EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
// At startup make sure we can send.
EXPECT_TRUE(sender_->TimeUntilSend(clock_.Now(),
0,
HAS_RETRANSMITTABLE_DATA).IsZero());
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
// Make sure we can send.
EXPECT_TRUE(sender_->TimeUntilSend(clock_.Now(),
0,
@@ -158,14 +154,10 @@ TEST_F(TcpCubicSenderTest, SimpleSender) {
TEST_F(TcpCubicSenderTest, ApplicationLimitedSlowStart) {
// Send exactly 10 packets and ensure the CWND ends at 14 packets.
const int kNumberOfAcks = 5;
- QuicCongestionFeedbackFrame feedback;
// At startup make sure we can send.
EXPECT_TRUE(sender_->TimeUntilSend(clock_.Now(),
0,
HAS_RETRANSMITTABLE_DATA).IsZero());
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
// Make sure we can send.
EXPECT_TRUE(sender_->TimeUntilSend(clock_.Now(),
0,
@@ -184,14 +176,10 @@ TEST_F(TcpCubicSenderTest, ApplicationLimitedSlowStart) {
TEST_F(TcpCubicSenderTest, ExponentialSlowStart) {
const int kNumberOfAcks = 20;
- QuicCongestionFeedbackFrame feedback;
// At startup make sure we can send.
EXPECT_TRUE(sender_->TimeUntilSend(clock_.Now(),
0,
HAS_RETRANSMITTABLE_DATA).IsZero());
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
// Make sure we can send.
EXPECT_TRUE(sender_->TimeUntilSend(clock_.Now(),
0,
@@ -217,11 +205,6 @@ TEST_F(TcpCubicSenderTest, SlowStartAckTrain) {
// 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;
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
for (int i = 0; i < kNumberOfAcks; ++i) {
// Send our full send window.
SendAvailableSendWindow();
@@ -263,12 +246,6 @@ TEST_F(TcpCubicSenderTest, SlowStartAckTrain) {
}
TEST_F(TcpCubicSenderTest, SlowStartPacketLoss) {
- // Make sure that we fall out of slow start when we encounter a packet loss.
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
const int kNumberOfAcks = 10;
for (int i = 0; i < kNumberOfAcks; ++i) {
// Send our full send window.
@@ -320,12 +297,6 @@ TEST_F(TcpCubicSenderTest, SlowStartPacketLoss) {
TEST_F(TcpCubicSenderTest, SlowStartPacketLossPRR) {
// Test based on the first example in RFC6937.
- // Make sure that we fall out of slow start when we encounter a packet loss.
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
// Ack 10 packets in 5 acks to raise the CWND to 20, as in the example.
const int kNumberOfAcks = 5;
for (int i = 0; i < kNumberOfAcks; ++i) {
@@ -376,12 +347,6 @@ TEST_F(TcpCubicSenderTest, SlowStartBurstPacketLossPRR) {
// Test based on the second example in RFC6937, though we also implement
// forward acknowledgements, so the first two incoming acks will trigger
// PRR immediately.
- // Make sure that we fall out of slow start when we encounter a packet loss.
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
// Ack 10 packets in 5 acks to raise the CWND to 20, as in the example.
const int kNumberOfAcks = 5;
for (int i = 0; i < kNumberOfAcks; ++i) {
@@ -507,11 +472,6 @@ TEST_F(TcpCubicSenderTest, SlowStartMaxSendWindow) {
sender_.reset(
new TcpCubicSenderPeer(&clock_, false, kMaxCongestionWindowTCP));
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
for (int i = 0; i < kNumberOfAcks; ++i) {
// Send our full send window.
SendAvailableSendWindow();
@@ -528,11 +488,6 @@ TEST_F(TcpCubicSenderTest, TcpRenoMaxCongestionWindow) {
sender_.reset(
new TcpCubicSenderPeer(&clock_, true, kMaxCongestionWindowTCP));
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
SendAvailableSendWindow();
AckNPackets(2);
// Make sure we fall out of slow start.
@@ -557,11 +512,6 @@ TEST_F(TcpCubicSenderTest, TcpCubicMaxCongestionWindow) {
sender_.reset(
new TcpCubicSenderPeer(&clock_, false, kMaxCongestionWindowTCP));
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
-
SendAvailableSendWindow();
AckNPackets(2);
// Make sure we fall out of slow start.
@@ -624,11 +574,6 @@ TEST_F(TcpCubicSenderTest, ConfigureMaxInitialWindow) {
}
TEST_F(TcpCubicSenderTest, CongestionAvoidanceAtEndOfRecovery) {
- // Make sure that we fall out of slow start when we encounter a packet loss.
- QuicCongestionFeedbackFrame feedback;
- // Get default QuicCongestionFeedbackFrame from receiver.
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- sender_->OnIncomingQuicCongestionFeedbackFrame(feedback, clock_.Now());
// Ack 10 packets in 5 acks to raise the CWND to 20.
const int kNumberOfAcks = 5;
for (int i = 0; i < kNumberOfAcks; ++i) {
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698