gfe-relnote: Test-only, enable tests in QuicConnectionTest when multipel packet number spaces are supported
PiperOrigin-RevId: 247520422
Change-Id: I1c4fb720e51235ee61b76d4a81b196b87d0ab7a6
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 87b3e0c..82c493c 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -1507,9 +1507,6 @@
::testing::ValuesIn(GetTestParams()));
TEST_P(QuicConnectionTest, SelfAddressChangeAtClient) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
@@ -1532,9 +1529,6 @@
}
TEST_P(QuicConnectionTest, SelfAddressChangeAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
@@ -1561,9 +1555,6 @@
}
TEST_P(QuicConnectionTest, AllowSelfAddressChangeToMappedIpv4AddressAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
@@ -1596,9 +1587,6 @@
}
TEST_P(QuicConnectionTest, ClientAddressChangeAndPacketReordered) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -1634,9 +1622,6 @@
}
TEST_P(QuicConnectionTest, PeerAddressChangeAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -1671,9 +1656,6 @@
}
TEST_P(QuicConnectionTest, EffectivePeerAddressChangeAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -1758,9 +1740,6 @@
}
TEST_P(QuicConnectionTest, ReceivePaddedPingAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -1843,9 +1822,6 @@
}
TEST_P(QuicConnectionTest, DiscardQueuedPacketsAfterConnectionClose) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Regression test for b/74073386.
{
InSequence seq;
@@ -1871,9 +1847,6 @@
}
TEST_P(QuicConnectionTest, ReceiveConnectivityProbingAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -1929,9 +1902,6 @@
}
TEST_P(QuicConnectionTest, ReceiveReorderedConnectivityProbingAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -1984,9 +1954,6 @@
}
TEST_P(QuicConnectionTest, MigrateAfterProbingAtServer) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -2037,9 +2004,6 @@
}
TEST_P(QuicConnectionTest, ReceivePaddedPingAtClient) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_CLIENT);
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
@@ -2082,9 +2046,6 @@
}
TEST_P(QuicConnectionTest, ReceiveConnectivityProbingAtClient) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_CLIENT);
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
@@ -2130,9 +2091,6 @@
}
TEST_P(QuicConnectionTest, PeerAddressChangeAtClient) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_CLIENT);
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
@@ -2166,17 +2124,11 @@
}
TEST_P(QuicConnectionTest, MaxPacketSize) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
EXPECT_EQ(1350u, connection_.max_packet_length());
}
TEST_P(QuicConnectionTest, SmallerServerMaxPacketSize) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
TestConnection connection(TestConnectionId(), kPeerAddress, helper_.get(),
alarm_factory_.get(), writer_.get(),
Perspective::IS_SERVER, version());
@@ -2185,9 +2137,6 @@
}
TEST_P(QuicConnectionTest, IncreaseServerMaxPacketSize) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
@@ -2226,9 +2175,6 @@
}
TEST_P(QuicConnectionTest, IncreaseServerMaxPacketSizeWhileWriterLimited) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
const QuicByteCount lower_max_packet_size = 1240;
@@ -2272,9 +2218,6 @@
}
TEST_P(QuicConnectionTest, LimitMaxPacketSizeByWriter) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const QuicByteCount lower_max_packet_size = 1240;
writer_->set_max_packet_size(lower_max_packet_size);
@@ -2286,9 +2229,6 @@
}
TEST_P(QuicConnectionTest, LimitMaxPacketSizeByWriterForNewConnection) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const QuicConnectionId connection_id = TestConnectionId(17);
const QuicByteCount lower_max_packet_size = 1240;
writer_->set_max_packet_size(lower_max_packet_size);
@@ -2411,9 +2351,6 @@
}
TEST_P(QuicConnectionTest, RejectUnencryptedStreamData) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// EXPECT_QUIC_BUG tests are expensive so only run one instance of them.
if (!IsDefaultTestConfiguration()) {
return;
@@ -2436,9 +2373,6 @@
}
TEST_P(QuicConnectionTest, OutOfOrderReceiptCausesAckSend) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
ProcessPacket(3);
@@ -2477,9 +2411,6 @@
}
TEST_P(QuicConnectionTest, OutOfOrderAckReceiptCausesNoAck) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
SendStreamDataToPeer(1, "foo", 0, NO_FIN, nullptr);
@@ -2499,9 +2430,6 @@
}
TEST_P(QuicConnectionTest, AckReceiptCausesAckSend) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
QuicPacketNumber original, second;
@@ -2569,9 +2497,6 @@
}
TEST_P(QuicConnectionTest, AckSentEveryNthPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.set_ack_frequency_before_ack_decimation(3);
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
@@ -2586,9 +2511,6 @@
}
TEST_P(QuicConnectionTest, AckDecimationReducesAcks) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const size_t kMinRttMs = 40;
RttStats* rtt_stats = const_cast<RttStats*>(manager_->GetRttStats());
rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(kMinRttMs),
@@ -2703,9 +2625,6 @@
}
TEST_P(QuicConnectionTest, TooManySentPackets) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
QuicPacketCount max_tracked_packets = 50;
@@ -2729,9 +2648,6 @@
}
TEST_P(QuicConnectionTest, LargestObservedLower) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
SendStreamDataToPeer(1, "foo", 0, NO_FIN, nullptr);
@@ -2756,9 +2672,6 @@
}
TEST_P(QuicConnectionTest, AckUnsentData) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Ack a packet which has not been sent.
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_INVALID_ACK_DATA, _,
ConnectionCloseSource::FROM_SELF));
@@ -2864,9 +2777,6 @@
// QuicConnection should record the packet sent-time prior to sending the
// packet.
TEST_P(QuicConnectionTest, RecordSentTimeBeforePacketSent) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// We're using a MockClock for the tests, so we have complete control over the
// time.
// Our recorded timestamp for the last packet sent time will be passed in to
@@ -2898,9 +2808,6 @@
}
TEST_P(QuicConnectionTest, FramePacking) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Send two stream frames in 1 packet by queueing them.
connection_.SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
{
@@ -2933,9 +2840,6 @@
}
TEST_P(QuicConnectionTest, FramePackingNonCryptoThenCrypto) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Send two stream frames (one non-crypto, then one crypto) in 2 packets by
// queueing them.
connection_.SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
@@ -2962,9 +2866,6 @@
}
TEST_P(QuicConnectionTest, FramePackingCryptoThenNonCrypto) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Send two stream frames (one crypto, then one non-crypto) in 2 packets by
// queueing them.
{
@@ -3038,9 +2939,6 @@
}
TEST_P(QuicConnectionTest, FramePackingSendv) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Send data in 1 packet by writing multiple blocks in a single iovector
// using writev.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
@@ -3070,9 +2968,6 @@
}
TEST_P(QuicConnectionTest, FramePackingSendvQueued) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Try to send two stream frames in 1 packet by using writev.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
@@ -3104,9 +2999,6 @@
}
TEST_P(QuicConnectionTest, SendingZeroBytes) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
// Send a zero byte write with a fin using writev.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
@@ -3133,9 +3025,6 @@
}
TEST_P(QuicConnectionTest, LargeSendWithPendingAck) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
// Set the ack alarm by processing a ping frame.
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
@@ -3173,9 +3062,6 @@
}
TEST_P(QuicConnectionTest, OnCanWrite) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Visitor's OnCanWrite will send data, but will have more pending writes.
EXPECT_CALL(visitor_, OnCanWrite())
.WillOnce(DoAll(IgnoreResult(InvokeWithoutArgs(
@@ -3205,9 +3091,6 @@
}
TEST_P(QuicConnectionTest, RetransmitOnNack) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicPacketNumber last_packet;
QuicByteCount second_packet_size;
SendStreamDataToPeer(3, "foo", 0, NO_FIN, &last_packet); // Packet 1
@@ -3236,9 +3119,6 @@
}
TEST_P(QuicConnectionTest, DoNotSendQueuedPacketForResetStream) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Block the connection to queue the packet.
BlockOnNextWrite();
@@ -3263,9 +3143,6 @@
}
TEST_P(QuicConnectionTest, SendQueuedPacketForQuicRstStreamNoError) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Block the connection to queue the packet.
BlockOnNextWrite();
@@ -3291,9 +3168,6 @@
}
TEST_P(QuicConnectionTest, DoNotRetransmitForResetStreamOnNack) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicStreamId stream_id = 2;
QuicPacketNumber last_packet;
SendStreamDataToPeer(stream_id, "foo", 0, NO_FIN, &last_packet);
@@ -3313,9 +3187,6 @@
}
TEST_P(QuicConnectionTest, RetransmitForQuicRstStreamNoErrorOnNack) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicStreamId stream_id = 2;
QuicPacketNumber last_packet;
SendStreamDataToPeer(stream_id, "foo", 0, NO_FIN, &last_packet);
@@ -3338,9 +3209,6 @@
}
TEST_P(QuicConnectionTest, DoNotRetransmitForResetStreamOnRTO) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicStreamId stream_id = 2;
QuicPacketNumber last_packet;
SendStreamDataToPeer(stream_id, "foo", 0, NO_FIN, &last_packet);
@@ -3361,9 +3229,6 @@
// Ensure that if the only data in flight is non-retransmittable, the
// retransmission alarm is not set.
TEST_P(QuicConnectionTest, CancelRetransmissionAlarmAfterResetStream) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicStreamId stream_id = 2;
QuicPacketNumber last_data_packet;
SendStreamDataToPeer(stream_id, "foo", 0, NO_FIN, &last_data_packet);
@@ -3395,9 +3260,6 @@
}
TEST_P(QuicConnectionTest, RetransmitForQuicRstStreamNoErrorOnRTO) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
QuicStreamId stream_id = 2;
@@ -3419,9 +3281,6 @@
}
TEST_P(QuicConnectionTest, DoNotSendPendingRetransmissionForResetStream) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicStreamId stream_id = 2;
QuicPacketNumber last_packet;
SendStreamDataToPeer(stream_id, "foo", 0, NO_FIN, &last_packet);
@@ -3456,9 +3315,6 @@
}
TEST_P(QuicConnectionTest, SendPendingRetransmissionForQuicRstStreamNoError) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicStreamId stream_id = 2;
QuicPacketNumber last_packet;
SendStreamDataToPeer(stream_id, "foo", 0, NO_FIN, &last_packet);
@@ -3494,9 +3350,6 @@
}
TEST_P(QuicConnectionTest, RetransmitAckedPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicPacketNumber last_packet;
SendStreamDataToPeer(1, "foo", 0, NO_FIN, &last_packet); // Packet 1
SendStreamDataToPeer(1, "foos", 3, NO_FIN, &last_packet); // Packet 2
@@ -3539,9 +3392,6 @@
}
TEST_P(QuicConnectionTest, RetransmitNackedLargestObserved) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
QuicPacketNumber original, second;
@@ -3569,9 +3419,6 @@
}
TEST_P(QuicConnectionTest, QueueAfterTwoRTOs) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
for (int i = 0; i < 10; ++i) {
@@ -3603,9 +3450,6 @@
}
TEST_P(QuicConnectionTest, WriteBlockedBufferedThenSent) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
BlockOnNextWrite();
writer_->set_is_write_blocked_data_buffered(true);
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
@@ -3618,9 +3462,6 @@
}
TEST_P(QuicConnectionTest, WriteBlockedThenSent) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0);
BlockOnNextWrite();
connection_.SendStreamDataWithString(1, "foo", 0, NO_FIN);
@@ -3640,9 +3481,6 @@
}
TEST_P(QuicConnectionTest, RetransmitWriteBlockedAckedOriginalThenSent) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
connection_.SendStreamDataWithString(3, "foo", 0, NO_FIN);
EXPECT_TRUE(connection_.GetRetransmissionAlarm()->IsSet());
@@ -3673,9 +3511,6 @@
}
TEST_P(QuicConnectionTest, AlarmsWhenWriteBlocked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Block the connection.
BlockOnNextWrite();
connection_.SendStreamDataWithString(3, "foo", 0, NO_FIN);
@@ -3690,9 +3525,6 @@
}
TEST_P(QuicConnectionTest, NoSendAlarmAfterProcessPacketWhenWriteBlocked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Block the connection.
@@ -3724,9 +3556,6 @@
}
TEST_P(QuicConnectionTest, AddToWriteBlockedListIfWriterBlockedWhenProcessing) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
SendStreamDataToPeer(1, "foo", 0, NO_FIN, nullptr);
@@ -3741,9 +3570,6 @@
}
TEST_P(QuicConnectionTest, DoNotAddToWriteBlockedListAfterDisconnect) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
writer_->SetBatchMode(true);
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PEER_GOING_AWAY, _,
@@ -3763,9 +3589,6 @@
}
TEST_P(QuicConnectionTest, AddToWriteBlockedListIfBlockedOnFlushPackets) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
writer_->SetBatchMode(true);
writer_->BlockOnNextFlush();
@@ -3779,9 +3602,6 @@
}
TEST_P(QuicConnectionTest, NoLimitPacketsPerNack) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
int offset = 0;
// Send packets 1 to 15.
@@ -3914,9 +3734,6 @@
}
TEST_P(QuicConnectionTest, TLP) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(1);
SendStreamDataToPeer(3, "foo", 0, NO_FIN, nullptr);
@@ -3937,9 +3754,6 @@
}
TEST_P(QuicConnectionTest, TailLossProbeDelayForStreamDataInTLPR) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Set TLPR from QuicConfig.
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
@@ -3971,9 +3785,6 @@
}
TEST_P(QuicConnectionTest, TailLossProbeDelayForNonStreamDataInTLPR) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Set TLPR from QuicConfig.
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
@@ -4095,9 +3906,6 @@
}
TEST_P(QuicConnectionTest, RTO) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
QuicTime default_retransmission_time =
@@ -4118,9 +3926,6 @@
}
TEST_P(QuicConnectionTest, RetransmitWithSameEncryptionLevel) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
use_tagging_decrypter();
// A TaggingEncrypter puts kTagSize copies of the given byte (0x01 here) at
@@ -4157,9 +3962,6 @@
}
TEST_P(QuicConnectionTest, SendHandshakeMessages) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
use_tagging_decrypter();
// A TaggingEncrypter puts kTagSize copies of the given byte (0x01 here) at
// the end of the packet. We can test this to check which encrypter was used.
@@ -4192,9 +3994,6 @@
TEST_P(QuicConnectionTest,
DropRetransmitsForNullEncryptedPacketAfterForwardSecure) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
use_tagging_decrypter();
connection_.SetEncrypter(ENCRYPTION_INITIAL,
QuicMakeUnique<TaggingEncrypter>(0x01));
@@ -4221,9 +4020,6 @@
}
TEST_P(QuicConnectionTest, RetransmitPacketsWithInitialEncryption) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
use_tagging_decrypter();
connection_.SetEncrypter(ENCRYPTION_INITIAL,
QuicMakeUnique<TaggingEncrypter>(0x01));
@@ -4279,9 +4075,6 @@
}
TEST_P(QuicConnectionTest, TestRetransmitOrder) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
QuicByteCount first_packet_size;
@@ -4355,9 +4148,6 @@
}
TEST_P(QuicConnectionTest, SetRTOAfterWritingToSocket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
BlockOnNextWrite();
connection_.SendStreamDataWithString(1, "foo", 0, NO_FIN);
// Make sure that RTO is not started when the packet is queued.
@@ -4370,9 +4160,6 @@
}
TEST_P(QuicConnectionTest, DelayRTOWithAckReceipt) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
@@ -4416,9 +4203,6 @@
}
TEST_P(QuicConnectionTest, TestQueued) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
EXPECT_EQ(0u, connection_.NumQueuedPackets());
@@ -4433,9 +4217,6 @@
}
TEST_P(QuicConnectionTest, InitialTimeout) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AnyNumber());
EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet());
@@ -4468,9 +4249,6 @@
}
TEST_P(QuicConnectionTest, IdleTimeoutAfterFirstSentPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AnyNumber());
EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet());
@@ -4522,9 +4300,6 @@
}
TEST_P(QuicConnectionTest, IdleTimeoutAfterSendTwoPackets) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AnyNumber());
EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet());
@@ -4585,9 +4360,6 @@
}
TEST_P(QuicConnectionTest, HandshakeTimeout) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Use a shorter handshake timeout than idle timeout for this test.
const QuicTime::Delta timeout = QuicTime::Delta::FromSeconds(5);
connection_.SetNetworkTimeouts(timeout, timeout);
@@ -4782,9 +4554,6 @@
// Tests whether MTU discovery does not happen when it is not explicitly enabled
// by the connection options.
TEST_P(QuicConnectionTest, MtuDiscoveryDisabled) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
const QuicPacketCount packets_between_probes_base = 10;
@@ -4801,9 +4570,6 @@
// Tests whether MTU discovery works when the probe gets acknowledged on the
// first try.
TEST_P(QuicConnectionTest, MtuDiscoveryEnabled) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
connection_.EnablePathMtuDiscovery(send_algorithm_);
@@ -4852,9 +4618,6 @@
// Tests whether MTU discovery works correctly when the probes never get
// acknowledged.
TEST_P(QuicConnectionTest, MtuDiscoveryFailed) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
connection_.EnablePathMtuDiscovery(send_algorithm_);
@@ -4937,9 +4700,6 @@
// Tests whether MTU discovery works when the writer has a limit on how large a
// packet can be.
TEST_P(QuicConnectionTest, MtuDiscoveryWriterLimited) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
const QuicByteCount mtu_limit = kMtuDiscoveryTargetPacketSizeHigh - 1;
@@ -4990,9 +4750,6 @@
// Tests whether MTU discovery works when the writer returns an error despite
// advertising higher packet length.
TEST_P(QuicConnectionTest, MtuDiscoveryWriterFailed) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
const QuicByteCount mtu_limit = kMtuDiscoveryTargetPacketSizeHigh - 1;
@@ -5045,9 +4802,6 @@
}
TEST_P(QuicConnectionTest, NoMtuDiscoveryAfterConnectionClosed) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
connection_.EnablePathMtuDiscovery(send_algorithm_);
@@ -5072,9 +4826,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfterSend) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
@@ -5124,9 +4875,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfterRetransmission) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
@@ -5202,9 +4950,6 @@
}
TEST_P(QuicConnectionTest, NewTimeoutAfterSendSilentClose) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Same test as above, but complete a handshake which enables silent close,
// causing no connection close packet to be sent.
EXPECT_TRUE(connection_.connected());
@@ -5272,9 +5017,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfterSendSilentCloseAndTLP) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Same test as above, but complete a handshake which enables silent close,
// but sending TLPs causes the connection close to be sent.
EXPECT_TRUE(connection_.connected());
@@ -5331,9 +5073,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfterSendSilentCloseWithOpenStreams) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Same test as above, but complete a handshake which enables silent close,
// but having open streams causes the connection close to be sent.
EXPECT_TRUE(connection_.connected());
@@ -5388,9 +5127,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfterReceive) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
@@ -5441,9 +5177,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfterReceiveNotSendWhenUnacked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
@@ -5506,9 +5239,6 @@
}
TEST_P(QuicConnectionTest, TimeoutAfter5ClientRTOs) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(2);
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
@@ -5543,9 +5273,6 @@
}
TEST_P(QuicConnectionTest, SendScheduler) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Test that if we send a packet without delay, it is not queued.
QuicFramerPeer::SetPerspective(&peer_framer_, Perspective::IS_CLIENT);
std::unique_ptr<QuicPacket> packet =
@@ -5558,9 +5285,6 @@
}
TEST_P(QuicConnectionTest, FailToSendFirstPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Test that the connection does not crash when it fails to send the first
// packet at which point self_address_ might be uninitialized.
QuicFramerPeer::SetPerspective(&peer_framer_, Perspective::IS_CLIENT);
@@ -5574,9 +5298,6 @@
}
TEST_P(QuicConnectionTest, SendSchedulerEAGAIN) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicFramerPeer::SetPerspective(&peer_framer_, Perspective::IS_CLIENT);
std::unique_ptr<QuicPacket> packet =
ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_INITIAL);
@@ -5590,10 +5311,6 @@
}
TEST_P(QuicConnectionTest, TestQueueLimitsOnSendStreamData) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
-
// Queue the first packet.
size_t payload_length = connection_.max_packet_length();
EXPECT_CALL(*send_algorithm_, CanSend(_)).WillOnce(testing::Return(false));
@@ -5608,10 +5325,6 @@
}
TEST_P(QuicConnectionTest, SendingThreePackets) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
-
// Make the payload twice the size of the packet, so 3 packets are written.
size_t total_payload_length = 2 * connection_.max_packet_length();
const std::string payload(total_payload_length, 'a');
@@ -5625,9 +5338,6 @@
}
TEST_P(QuicConnectionTest, LoopThroughSendingPacketsWithTruncation) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
set_perspective(Perspective::IS_SERVER);
if (GetParam().version.transport_version <= QUIC_VERSION_43) {
// For IETF QUIC, encryption level will be switched to FORWARD_SECURE in
@@ -5668,9 +5378,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAck) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicTime ack_time = clock_.ApproximateNow() + DefaultDelayedAckTime();
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
@@ -5707,9 +5414,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAfterQuiescence) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicConnectionPeer::SetFastAckAfterQuiescence(&connection_, true);
// The beginning of the connection counts as quiescence.
@@ -5784,9 +5488,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckDecimation) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION);
@@ -5845,9 +5546,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckAckDecimationAfterQuiescence) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION);
QuicConnectionPeer::SetFastAckAfterQuiescence(&connection_, true);
@@ -5979,9 +5677,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckDecimationUnlimitedAggregation) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
@@ -6041,9 +5736,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckDecimationEighthRtt) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION);
QuicConnectionPeer::SetAckDecimationDelay(&connection_, 0.125);
@@ -6103,9 +5795,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckDecimationWithReordering) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION_WITH_REORDERING);
@@ -6170,9 +5859,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckDecimationWithLargeReordering) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION_WITH_REORDERING);
@@ -6256,9 +5942,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckDecimationWithReorderingEighthRtt) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION_WITH_REORDERING);
QuicConnectionPeer::SetAckDecimationDelay(&connection_, 0.125);
@@ -6327,9 +6010,6 @@
TEST_P(QuicConnectionTest,
SendDelayedAckDecimationWithLargeReorderingEighthRtt) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber());
QuicConnectionPeer::SetAckMode(&connection_, ACK_DECIMATION_WITH_REORDERING);
QuicConnectionPeer::SetAckDecimationDelay(&connection_, 0.125);
@@ -6414,9 +6094,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckOnHandshakeConfirmed) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
ProcessPacket(1);
// Check that ack is sent and that delayed ack alarm is set.
@@ -6438,9 +6115,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckOnSecondPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
ProcessPacket(1);
ProcessPacket(2);
@@ -6458,9 +6132,6 @@
}
TEST_P(QuicConnectionTest, NoAckOnOldNacks) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Drop one packet, triggering a sequence of acks.
if (GetQuicRestartFlag(quic_enable_accept_random_ipn)) {
@@ -6514,9 +6185,6 @@
}
TEST_P(QuicConnectionTest, SendDelayedAckOnOutgoingPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_CALL(visitor_, OnStreamFrame(_));
peer_framer_.SetEncrypter(ENCRYPTION_FORWARD_SECURE,
@@ -6561,9 +6229,6 @@
}
TEST_P(QuicConnectionTest, BlockAndBufferOnFirstCHLOPacketOfTwo) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
ProcessPacket(1);
BlockOnNextWrite();
@@ -6649,9 +6314,6 @@
}
TEST_P(QuicConnectionTest, BundleAckWithDataOnIncomingAck) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
connection_.SendStreamDataWithString(
GetNthClientInitiatedStreamId(1, connection_.transport_version()), "foo",
@@ -6709,9 +6371,6 @@
}
TEST_P(QuicConnectionTest, NoAckSentForClose) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
ProcessPacket(1);
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PEER_GOING_AWAY, _,
@@ -6721,9 +6380,6 @@
}
TEST_P(QuicConnectionTest, SendWhenDisconnected) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PEER_GOING_AWAY, _,
ConnectionCloseSource::FROM_SELF));
@@ -6764,9 +6420,6 @@
}
TEST_P(QuicConnectionTest, WriteBlockedAfterClientSendsConnectivityProbe) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
TestPacketWriter probing_writer(version(), &clock_);
// Block next write so that sending connectivity probe will encounter a
@@ -6783,9 +6436,6 @@
}
TEST_P(QuicConnectionTest, WriterBlockedAfterServerSendsConnectivityProbe) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -6803,9 +6453,6 @@
}
TEST_P(QuicConnectionTest, WriterErrorWhenClientSendsConnectivityProbe) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
TestPacketWriter probing_writer(version(), &clock_);
probing_writer.SetShouldWriteFail();
@@ -6821,9 +6468,6 @@
}
TEST_P(QuicConnectionTest, WriterErrorWhenServerSendsConnectivityProbe) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
set_perspective(Perspective::IS_SERVER);
QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
@@ -6894,9 +6538,6 @@
}
TEST_P(QuicConnectionTest, WindowUpdate) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
QuicWindowUpdateFrame window_update;
@@ -6907,9 +6548,6 @@
}
TEST_P(QuicConnectionTest, Blocked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
QuicBlockedFrame blocked;
@@ -6921,9 +6559,6 @@
}
TEST_P(QuicConnectionTest, ZeroBytePacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Don't close the connection for zero byte packets.
EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(0);
QuicReceivedPacket encrypted(nullptr, 0, QuicTime::Zero());
@@ -6931,8 +6566,7 @@
}
TEST_P(QuicConnectionTest, MissingPacketsBeforeLeastUnacked) {
- if (GetParam().version.transport_version > QUIC_VERSION_43 ||
- connection_.SupportsMultiplePacketNumberSpaces()) {
+ if (GetParam().version.transport_version > QUIC_VERSION_43) {
return;
}
// Set the packet number of the ack packet to be least unacked (4).
@@ -6943,9 +6577,6 @@
}
TEST_P(QuicConnectionTest, ServerSendsVersionNegotiationPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Turn off QUIC_VERSION_99.
SetQuicReloadableFlag(quic_enable_version_99, false);
connection_.SetSupportedVersions(CurrentSupportedVersions());
@@ -6999,9 +6630,6 @@
}
TEST_P(QuicConnectionTest, ServerSendsVersionNegotiationPacketSocketBlocked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Turn off QUIC_VERSION_99.
SetQuicReloadableFlag(quic_enable_version_99, false);
connection_.SetSupportedVersions(CurrentSupportedVersions());
@@ -7062,9 +6690,6 @@
TEST_P(QuicConnectionTest,
ServerSendsVersionNegotiationPacketSocketBlockedDataBuffered) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Turn off QUIC_VERSION_99.
SetQuicReloadableFlag(quic_enable_version_99, false);
connection_.SetSupportedVersions(CurrentSupportedVersions());
@@ -7111,9 +6736,6 @@
}
TEST_P(QuicConnectionTest, ClientHandlesVersionNegotiation) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const bool expect_failure =
GetQuicReloadableFlag(quic_no_client_conn_ver_negotiation) ||
connection_.version().handshake_protocol !=
@@ -7169,9 +6791,6 @@
}
TEST_P(QuicConnectionTest, BadVersionNegotiation) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Send a version negotiation packet with the version the client started with.
// It should be rejected.
EXPECT_CALL(visitor_,
@@ -7187,9 +6806,6 @@
}
TEST_P(QuicConnectionTest, CheckSendStats) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetMaxTailLossProbes(0);
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
@@ -7247,9 +6863,6 @@
}
TEST_P(QuicConnectionTest, ProcessFramesIfPacketClosedConnection) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Construct a packet with stream frame and connection close frame.
QuicPacketHeader header;
header.destination_connection_id = connection_id_;
@@ -7287,9 +6900,6 @@
}
TEST_P(QuicConnectionTest, SelectMutualVersion) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
connection_.SetSupportedVersions(AllSupportedVersions());
// Set the connection to speak the lowest quic version.
connection_.set_version(QuicVersionMin());
@@ -7316,9 +6926,6 @@
}
TEST_P(QuicConnectionTest, ConnectionCloseWhenWritable) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_FALSE(writer_->IsWriteBlocked());
// Send a packet.
@@ -7331,9 +6938,6 @@
}
TEST_P(QuicConnectionTest, ConnectionCloseGettingWriteBlocked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
BlockOnNextWrite();
TriggerConnectionClose();
EXPECT_EQ(1u, writer_->packets_write_attempts());
@@ -7341,9 +6945,6 @@
}
TEST_P(QuicConnectionTest, ConnectionCloseWhenWriteBlocked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
BlockOnNextWrite();
connection_.SendStreamDataWithString(1, "foo", 0, NO_FIN);
EXPECT_EQ(1u, connection_.NumQueuedPackets());
@@ -7354,9 +6955,6 @@
}
TEST_P(QuicConnectionTest, OnPacketSentDebugVisitor) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
MockQuicConnectionDebugVisitor debug_visitor;
connection_.set_debug_visitor(&debug_visitor);
@@ -7369,9 +6967,6 @@
}
TEST_P(QuicConnectionTest, OnPacketHeaderDebugVisitor) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicPacketHeader header;
header.packet_number = QuicPacketNumber(1);
if (GetParam().version.transport_version > QUIC_VERSION_43) {
@@ -7387,9 +6982,6 @@
}
TEST_P(QuicConnectionTest, Pacing) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
TestConnection server(connection_id_, kSelfAddress, helper_.get(),
alarm_factory_.get(), writer_.get(),
Perspective::IS_SERVER, version());
@@ -7405,9 +6997,6 @@
}
TEST_P(QuicConnectionTest, WindowUpdateInstigateAcks) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Send a WINDOW_UPDATE frame.
@@ -7423,9 +7012,6 @@
}
TEST_P(QuicConnectionTest, BlockedFrameInstigateAcks) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Send a BLOCKED frame.
@@ -7440,9 +7026,6 @@
}
TEST_P(QuicConnectionTest, ReevaluateTimeUntilSendOnAck) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Enable pacing.
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
@@ -7501,9 +7084,6 @@
}
TEST_P(QuicConnectionTest, SendPingImmediately) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
MockQuicConnectionDebugVisitor debug_visitor;
connection_.set_debug_visitor(&debug_visitor);
@@ -7516,9 +7096,6 @@
}
TEST_P(QuicConnectionTest, SendBlockedImmediately) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
MockQuicConnectionDebugVisitor debug_visitor;
connection_.set_debug_visitor(&debug_visitor);
@@ -7531,9 +7108,6 @@
}
TEST_P(QuicConnectionTest, SendingUnencryptedStreamDataFails) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// EXPECT_QUIC_BUG tests are expensive so only run one instance of them.
if (!IsDefaultTestConfiguration()) {
return;
@@ -7550,9 +7124,6 @@
}
TEST_P(QuicConnectionTest, SetRetransmissionAlarmForCryptoPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
@@ -7574,9 +7145,6 @@
}
TEST_P(QuicConnectionTest, PathDegradingAlarmForCryptoPacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_FALSE(connection_.GetPathDegradingAlarm()->IsSet());
EXPECT_FALSE(connection_.IsPathDegrading());
@@ -7602,9 +7170,6 @@
// Includes regression test for b/69979024.
TEST_P(QuicConnectionTest, PathDegradingAlarmForNonCryptoPackets) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_FALSE(connection_.GetPathDegradingAlarm()->IsSet());
EXPECT_FALSE(connection_.IsPathDegrading());
@@ -7679,9 +7244,6 @@
}
TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const QuicTime::Delta retransmittable_on_wire_timeout =
QuicTime::Delta::FromMilliseconds(50);
connection_.set_retransmittable_on_wire_timeout(
@@ -7753,9 +7315,6 @@
// spin timer to detect path degrading when a new packet is sent on the
// degraded path.
TEST_P(QuicConnectionTest, NoPathDegradingAlarmIfPathIsDegrading) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_FALSE(connection_.GetPathDegradingAlarm()->IsSet());
EXPECT_FALSE(connection_.IsPathDegrading());
@@ -7822,9 +7381,6 @@
// the timer to detect future path degrading when forward progress is made
// after path has been marked degrading.
TEST_P(QuicConnectionTest, UnmarkPathDegradingOnForwardProgress) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_TRUE(connection_.connected());
EXPECT_FALSE(connection_.GetPathDegradingAlarm()->IsSet());
EXPECT_FALSE(connection_.IsPathDegrading());
@@ -7937,9 +7493,6 @@
}
TEST_P(QuicConnectionTest, MultipleCallsToCloseConnection) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Verifies that multiple calls to CloseConnection do not
// result in multiple attempts to close the connection - it will be marked as
// disconnected after the first call.
@@ -7951,9 +7504,6 @@
}
TEST_P(QuicConnectionTest, ServerReceivesChloOnNonCryptoStream) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
set_perspective(Perspective::IS_SERVER);
@@ -7973,9 +7523,6 @@
}
TEST_P(QuicConnectionTest, ClientReceivesRejOnNonCryptoStream) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
CryptoHandshakeMessage message;
@@ -7992,9 +7539,6 @@
}
TEST_P(QuicConnectionTest, CloseConnectionOnPacketTooLarge) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
SimulateNextPacketTooLarge();
// A connection close packet is sent
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PACKET_WRITE_ERROR, _,
@@ -8004,9 +7548,6 @@
}
TEST_P(QuicConnectionTest, AlwaysGetPacketTooLarge) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// Test even we always get packet too large, we do not infinitely try to send
// close packet.
AlwaysGetPacketTooLarge();
@@ -8019,9 +7560,6 @@
// Verify that if connection has no outstanding data, it notifies the send
// algorithm after the write.
TEST_P(QuicConnectionTest, SendDataAndBecomeApplicationLimited) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(*send_algorithm_, OnApplicationLimited(_)).Times(1);
{
InSequence seq;
@@ -8037,9 +7575,6 @@
// Verify that the connection does not become app-limited if there is
// outstanding data to send after the write.
TEST_P(QuicConnectionTest, NotBecomeApplicationLimitedIfMoreDataAvailable) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(*send_algorithm_, OnApplicationLimited(_)).Times(0);
{
InSequence seq;
@@ -8053,9 +7588,6 @@
// Verify that the connection does not become app-limited after blocked write
// even if there is outstanding data to send after the write.
TEST_P(QuicConnectionTest, NotBecomeApplicationLimitedDueToWriteBlock) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(*send_algorithm_, OnApplicationLimited(_)).Times(0);
EXPECT_CALL(visitor_, WillingAndAbleToWrite()).WillRepeatedly(Return(true));
BlockOnNextWrite();
@@ -8078,9 +7610,6 @@
// Test the mode in which the link is filled up with probing retransmissions if
// the connection becomes application-limited.
TEST_P(QuicConnectionTest, SendDataWhenApplicationLimited) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_CALL(*send_algorithm_, ShouldSendProbingPacket())
.WillRepeatedly(Return(true));
@@ -8128,9 +7657,6 @@
}
TEST_P(QuicConnectionTest, DonotForceSendingAckOnPacketTooLarge) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
// Send an ack by simulating delayed ack alarm firing.
ProcessPacket(1);
@@ -8148,9 +7674,6 @@
}
TEST_P(QuicConnectionTest, CloseConnectionForStatelessReject) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
std::string error_details("stateless reject");
EXPECT_CALL(visitor_, OnConnectionClosed(
QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT,
@@ -8163,9 +7686,6 @@
// Regression test for b/63620844.
TEST_P(QuicConnectionTest, FailedToWriteHandshakePacket) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
SimulateNextPacketTooLarge();
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PACKET_WRITE_ERROR, _,
ConnectionCloseSource::FROM_SELF))
@@ -8174,18 +7694,12 @@
}
TEST_P(QuicConnectionTest, MaxPacingRate) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_EQ(0, connection_.MaxPacingRate().ToBytesPerSecond());
connection_.SetMaxPacingRate(QuicBandwidth::FromBytesPerSecond(100));
EXPECT_EQ(100, connection_.MaxPacingRate().ToBytesPerSecond());
}
TEST_P(QuicConnectionTest, ClientAlwaysSendConnectionId) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
connection_.SendStreamDataWithString(3, "foo", 0, NO_FIN);
@@ -8205,9 +7719,6 @@
}
TEST_P(QuicConnectionTest, SendProbingRetransmissions) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
MockQuicConnectionDebugVisitor debug_visitor;
connection_.set_debug_visitor(&debug_visitor);
@@ -8258,9 +7769,6 @@
// there are no outstanding packets.
TEST_P(QuicConnectionTest,
SendProbingRetransmissionsFailsWhenNothingToRetransmit) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
ASSERT_TRUE(connection_.sent_packet_manager().unacked_packets().empty());
MockQuicConnectionDebugVisitor debug_visitor;
@@ -8277,9 +7785,6 @@
}
TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const QuicTime::Delta retransmittable_on_wire_timeout =
QuicTime::Delta::FromMilliseconds(50);
connection_.set_retransmittable_on_wire_timeout(
@@ -8373,9 +7878,6 @@
}
TEST_P(QuicConnectionTest, NoPingIfRetransmittablePacketSent) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const QuicTime::Delta retransmittable_on_wire_timeout =
QuicTime::Delta::FromMilliseconds(50);
connection_.set_retransmittable_on_wire_timeout(
@@ -8449,9 +7951,6 @@
}
TEST_P(QuicConnectionTest, OnForwardProgressConfirmed) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnForwardProgressConfirmed()).Times(Exactly(0));
EXPECT_TRUE(connection_.connected());
@@ -8491,9 +7990,6 @@
}
TEST_P(QuicConnectionTest, ValidStatelessResetToken) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
const QuicUint128 kTestToken = 1010101;
const QuicUint128 kWrongTestToken = 1010100;
QuicConfig config;
@@ -8512,9 +8008,6 @@
}
TEST_P(QuicConnectionTest, WriteBlockedWithInvalidAck) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_INVALID_ACK_DATA, _, _));
@@ -8620,9 +8113,6 @@
// Regression test for b/110259444
TEST_P(QuicConnectionTest, DoNotScheduleSpuriousAckAlarm) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
SetQuicReloadableFlag(quic_fix_spurious_ack_alarm, true);
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_CALL(visitor_, OnWriteBlocked()).Times(AtLeast(1));
@@ -8644,9 +8134,6 @@
}
TEST_P(QuicConnectionTest, DisablePacingOffloadConnectionOptions) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
EXPECT_FALSE(QuicConnectionPeer::SupportsReleaseTime(&connection_));
writer_->set_supports_release_time(true);
QuicConfig config;
@@ -8666,9 +8153,6 @@
// Regression test for b/110259444
// Get a path response without having issued a path challenge...
TEST_P(QuicConnectionTest, OrphanPathResponse) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
QuicPathFrameBuffer data = {{0, 1, 2, 3, 4, 5, 6, 7}};
QuicPathResponseFrame frame(99, data);
@@ -8684,9 +8168,6 @@
// Regression test for b/120791670
TEST_P(QuicConnectionTest, StopProcessingGQuicPacketInIetfQuicConnection) {
- if (connection_.SupportsMultiplePacketNumberSpaces()) {
- return;
- }
// This test mimics a problematic scenario where an IETF QUIC connection
// receives a Google QUIC packet and continue processing it using Google QUIC
// wire format.