mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Change Quic qlogger vantage point to enum
Summary: To prevent adhoc string passed in Reviewed By: sharma95 Differential Revision: D18013615 fbshipit-source-id: 6f5512468755c2b1ecbba3ba42188fa22f4e94b9
This commit is contained in:
committed by
Facebook Github Bot
parent
ba81f31db5
commit
9247b8f49b
@@ -182,7 +182,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnection) {
|
||||
auto mockCongestionController = std::make_unique<MockCongestionController>();
|
||||
auto rawCongestionController = mockCongestionController.get();
|
||||
conn->congestionController = std::move(mockCongestionController);
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
// Builds a fake packet to test with.
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
|
||||
@@ -339,7 +339,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnection) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPacketSorting) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
conn->ackStates.initialAckState.nextPacketNum = 0;
|
||||
conn->ackStates.handshakeAckState.nextPacketNum = 1;
|
||||
conn->ackStates.appDataAckState.nextPacketNum = 2;
|
||||
@@ -403,7 +403,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPacketSorting) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionFinOnly) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
auto stream1 = conn->streamManager->createNextBidirectionalStream().value();
|
||||
|
||||
@@ -444,7 +444,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionFinOnly) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionAllBytesExceptFin) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
|
||||
auto stream1 = conn->streamManager->createNextUnidirectionalStream().value();
|
||||
@@ -491,7 +491,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionAllBytesExceptFin) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionEmptyAckWriteResult) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
// None of the largestAckScheduled should be changed. But since
|
||||
// buildEmptyPacket() builds a Handshake packet, we use handshakeAckState to
|
||||
@@ -520,7 +520,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionEmptyAckWriteResult) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPureAckCounter) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto stream = conn->streamManager->createNextBidirectionalStream().value();
|
||||
writeDataToQuicStream(*stream, nullptr, true);
|
||||
EXPECT_EQ(0, conn->outstandingHandshakePacketsCount);
|
||||
@@ -572,7 +572,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPureAckCounter) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestPaddingPureAckPacketIsStillPureAck) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
auto packetEncodedSize =
|
||||
packet.header ? packet.header->computeChainDataLength() : 0;
|
||||
@@ -603,7 +603,7 @@ TEST_F(QuicTransportFunctionsTest, TestPaddingPureAckPacketIsStillPureAck) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionHandshakeCounter) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto stream = conn->streamManager->createNextBidirectionalStream().value();
|
||||
writeDataToQuicStream(*stream, nullptr, true);
|
||||
EXPECT_EQ(0, conn->outstandingHandshakePacketsCount);
|
||||
@@ -670,7 +670,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionHandshakeCounter) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionForOneRttCryptoData) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto stream = conn->streamManager->createNextBidirectionalStream().value();
|
||||
writeDataToQuicStream(*stream, nullptr, true);
|
||||
EXPECT_EQ(0, conn->outstandingHandshakePacketsCount);
|
||||
@@ -741,7 +741,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionForOneRttCryptoData) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionWithPureAck) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
auto mockPacer = std::make_unique<MockPacer>();
|
||||
auto rawPacer = mockPacer.get();
|
||||
@@ -780,7 +780,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionWithPureAck) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionWithBytesStats) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
conn->lossState.totalBytesSent = 13579;
|
||||
conn->lossState.totalBytesAcked = 8642;
|
||||
@@ -830,7 +830,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionWithBytesStats) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionWithCloneResult) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto mockCongestionController = std::make_unique<MockCongestionController>();
|
||||
auto rawCongestionController = mockCongestionController.get();
|
||||
conn->congestionController = std::move(mockCongestionController);
|
||||
@@ -885,7 +885,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionWithCloneResult) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionStreamWindowUpdate) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
auto packetNum = packet.packet.header.getPacketSequenceNum();
|
||||
auto stream = conn->streamManager->createNextBidirectionalStream().value();
|
||||
@@ -920,7 +920,7 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionStreamWindowUpdate) {
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionConnWindowUpdate) {
|
||||
auto conn = createConn();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>();
|
||||
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::CLIENT);
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
auto packetNum = packet.packet.header.getPacketSequenceNum();
|
||||
conn->pendingEvents.connWindowUpdate = true;
|
||||
|
Reference in New Issue
Block a user