gfe-relnote: In QUIC, add connection option to enable IETF loss detection with both adaptive packet and adaptive time threshold. Protected by existing gfe2_reloadable_flag_quic_enable_ietf_loss_detection.
PiperOrigin-RevId: 278375594
Change-Id: Ib3dd4aa9208ec367197ec46d5b401c0f390e6085
diff --git a/quic/core/quic_sent_packet_manager_test.cc b/quic/core/quic_sent_packet_manager_test.cc
index c9d70b9..b7ca395 100644
--- a/quic/core/quic_sent_packet_manager_test.cc
+++ b/quic/core/quic_sent_packet_manager_test.cc
@@ -1851,6 +1851,35 @@
QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
}
+TEST_F(QuicSentPacketManagerTest,
+ NegotiateIetfLossDetectionAdaptiveReorderingAndTimeThreshold) {
+ SetQuicReloadableFlag(quic_enable_ietf_loss_detection, true);
+ EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
+ ->GetLossDetectionType());
+ EXPECT_FALSE(
+ QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+ EXPECT_FALSE(
+ QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+
+ QuicConfig config;
+ QuicTagVector options;
+ options.push_back(kILD4);
+ QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
+ EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
+ manager_.SetFromConfig(config);
+
+ EXPECT_EQ(kIetfLossDetection,
+ QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
+ ->GetLossDetectionType());
+ EXPECT_EQ(kDefaultLossDelayShift,
+ QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
+ EXPECT_TRUE(
+ QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+ EXPECT_TRUE(
+ QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+}
+
TEST_F(QuicSentPacketManagerTest, NegotiateCongestionControlFromOptions) {
QuicConfig config;
QuicTagVector options;