1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-06 22:22:38 +03:00

Require AppData packet number space when checking D6D packet

Summary: ^

Reviewed By: yangchi

Differential Revision: D25539225

fbshipit-source-id: 7d68917c73228c006ebec38be1ee86ccb12362f1
This commit is contained in:
Xiaoting Tang
2020-12-17 10:10:22 -08:00
committed by Facebook GitHub Bot
parent 40eb8b4981
commit 96bf643f4f
2 changed files with 15 additions and 2 deletions

View File

@@ -374,6 +374,18 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionD6DNotConsumeSendPing) {
EXPECT_TRUE(conn->pendingEvents.sendPing);
}
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionD6DNeedsAppDataPNSpace) {
auto conn = createConn();
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
packet.packet.frames.push_back(PingFrame());
auto packetNum = packet.packet.header.getPacketSequenceNum();
conn->d6d.lastProbe = D6DProbePacket(packetNum, 50);
updateConnection(*conn, folly::none, packet.packet, Clock::now(), 50);
EXPECT_EQ(1, conn->outstandings.packets.size());
EXPECT_FALSE(conn->outstandings.packets.front().metadata.isD6DProbe);
EXPECT_EQ(0, conn->d6d.outstandingProbes);
}
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPacketSorting) {
auto conn = createConn();
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::Client);