mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-06 22:22:38 +03:00
Do not fallback to Ping if any probe is written, or if we don't have probe
Summary: as title. Reviewed By: mjoras Differential Revision: D22044917 fbshipit-source-id: 18a4c988633c04233591bc596fd811ebe98c1171
This commit is contained in:
committed by
Facebook GitHub Bot
parent
25a646f96a
commit
4790a5792d
@@ -1572,6 +1572,30 @@ TEST_F(QuicTransportFunctionsTest, WriteProbingCryptoData) {
|
||||
EXPECT_FALSE(cryptoStream->retransmissionBuffer.empty());
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, ProbingNotFallbackToPingWhenNoQuota) {
|
||||
auto conn = createConn();
|
||||
auto mockCongestionController =
|
||||
std::make_unique<NiceMock<MockCongestionController>>();
|
||||
auto rawCongestionController = mockCongestionController.get();
|
||||
conn->congestionController = std::move(mockCongestionController);
|
||||
EventBase evb;
|
||||
auto socket =
|
||||
std::make_unique<NiceMock<folly::test::MockAsyncUDPSocket>>(&evb);
|
||||
auto rawSocket = socket.get();
|
||||
EXPECT_CALL(*rawCongestionController, onPacketSent(_)).Times(0);
|
||||
EXPECT_CALL(*rawSocket, write(_, _)).Times(0);
|
||||
uint8_t probesToSend = 0;
|
||||
EXPECT_EQ(
|
||||
0,
|
||||
writeProbingDataToSocketForTest(
|
||||
*rawSocket,
|
||||
*conn,
|
||||
probesToSend,
|
||||
*aead,
|
||||
*headerCipher,
|
||||
getVersion(*conn)));
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, ProbingFallbackToPing) {
|
||||
auto conn = createConn();
|
||||
auto mockCongestionController =
|
||||
|
Reference in New Issue
Block a user