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

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

Issue 2393933002: Move the logic from SendAlgorithmInterface::RetransmissionDelay() into QuicSentPacketManager, becau… (Closed)
Patch Set: Created 4 years, 2 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/core/congestion_control/tcp_cubic_sender_packets_test.cc
diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc b/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
index d03dda895e1d7f310f7abd88d478d4f45f7ae767..61b7192c8648359fd84f9eb72ff50678fdc97cde 100644
--- a/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
+++ b/net/quic/core/congestion_control/tcp_cubic_sender_packets_test.cc
@@ -508,41 +508,6 @@ TEST_F(TcpCubicSenderPacketsTest, RTOCongestionWindowNoRetransmission) {
EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
}
-TEST_F(TcpCubicSenderPacketsTest, RetransmissionDelay) {
- const int64_t kRttMs = 10;
- const int64_t kDeviationMs = 3;
- EXPECT_EQ(QuicTime::Delta::Zero(), sender_->RetransmissionDelay());
-
- sender_->rtt_stats_.UpdateRtt(QuicTime::Delta::FromMilliseconds(kRttMs),
- QuicTime::Delta::Zero(), clock_.Now());
-
- // Initial value is to set the median deviation to half of the initial
- // rtt, the median in then multiplied by a factor of 4 and finally the
- // smoothed rtt is added which is the initial rtt.
- QuicTime::Delta expected_delay =
- QuicTime::Delta::FromMilliseconds(kRttMs + kRttMs / 2 * 4);
- EXPECT_EQ(expected_delay, sender_->RetransmissionDelay());
-
- for (int i = 0; i < 100; ++i) {
- // Run to make sure that we converge.
- sender_->rtt_stats_.UpdateRtt(
- QuicTime::Delta::FromMilliseconds(kRttMs + kDeviationMs),
- QuicTime::Delta::Zero(), clock_.Now());
- sender_->rtt_stats_.UpdateRtt(
- QuicTime::Delta::FromMilliseconds(kRttMs - kDeviationMs),
- QuicTime::Delta::Zero(), clock_.Now());
- }
- expected_delay = QuicTime::Delta::FromMilliseconds(kRttMs + kDeviationMs * 4);
-
- EXPECT_NEAR(kRttMs, sender_->rtt_stats_.smoothed_rtt().ToMilliseconds(), 1);
- EXPECT_NEAR(expected_delay.ToMilliseconds(),
- sender_->RetransmissionDelay().ToMilliseconds(), 1);
- EXPECT_EQ(static_cast<int64_t>(
- sender_->GetCongestionWindow() * kNumMicrosPerSecond /
- sender_->rtt_stats_.smoothed_rtt().ToMicroseconds()),
- sender_->BandwidthEstimate().ToBytesPerSecond());
-}
-
TEST_F(TcpCubicSenderPacketsTest, SlowStartMaxSendWindow) {
const QuicPacketCount kMaxCongestionWindowTCP = 50;
const int kNumberOfAcks = 100;
« no previous file with comments | « net/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698