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

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

Issue 2005853002: Ignore the peer's receive buffer in QUIC and instead set the max CWND to 2000 packets. Protected b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122420070
Patch Set: Created 4 years, 7 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_packets.cc ('k') | net/quic/quic_config.h » ('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_packets_test.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc b/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
index 6f831061d4415a36640179a7a1400ae14ba81767..6684e8df8132a2878af14e8f8d9d20649a20063e 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
@@ -47,6 +47,8 @@ class TcpCubicSenderPacketsPeer : public TcpCubicSenderPackets {
QuicPacketCount congestion_window() { return congestion_window_; }
+ QuicPacketCount max_congestion_window() { return max_tcp_congestion_window_; }
+
QuicPacketCount slowstart_threshold() { return slowstart_threshold_; }
const HybridSlowStart& hybrid_slow_start() const {
@@ -961,5 +963,24 @@ TEST_F(TcpCubicSenderPacketsTest, ResetAfterConnectionMigration) {
EXPECT_FALSE(sender_->hybrid_slow_start().started());
}
+TEST_F(TcpCubicSenderPacketsTest, DefaultMaxCwnd) {
+ ValueRestore<bool> old_flag(&FLAGS_quic_ignore_srbf, true);
+ RttStats rtt_stats;
+ QuicConnectionStats stats;
+ std::unique_ptr<SendAlgorithmInterface> sender(SendAlgorithmInterface::Create(
+ &clock_, &rtt_stats, kCubic, &stats, kInitialCongestionWindow));
+
+ SendAlgorithmInterface::CongestionVector acked_packets;
+ SendAlgorithmInterface::CongestionVector missing_packets;
+ for (uint64_t i = 1; i < kDefaultMaxCongestionWindowPackets; ++i) {
+ acked_packets.clear();
+ acked_packets.push_back(std::make_pair(i, 1350));
+ sender->OnCongestionEvent(true, sender->GetCongestionWindow(),
+ acked_packets, missing_packets);
+ }
+ EXPECT_EQ(kDefaultMaxCongestionWindowPackets,
+ sender->GetCongestionWindow() / kDefaultTCPMSS);
+}
+
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_packets.cc ('k') | net/quic/quic_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698