mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-10 21:22:20 +03:00
Exposing quicSocket to observers (#185)
Summary: Giving more access to the current state of the connection by exposing the socket. Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/185 Reviewed By: yangchi Differential Revision: D23924861 Pulled By: bschlinker fbshipit-source-id: 16866a93e58b6544e25d474a51ca17fab9ffdc55
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f16d60e922
commit
185a6730b6
@@ -1922,16 +1922,18 @@ TEST_F(QuicLossFunctionsTest, TestReorderLossObserverCallback) {
|
||||
// 1, 2 and 6 are "lost" due to reodering. None lost due to timeout
|
||||
EXPECT_CALL(
|
||||
ib,
|
||||
packetLossDetected(Field(
|
||||
&InstrumentationObserver::ObserverLossEvent::lostPackets,
|
||||
UnorderedElementsAre(
|
||||
getLossPacketMatcher(true, false),
|
||||
getLossPacketMatcher(true, false),
|
||||
getLossPacketMatcher(true, false)))))
|
||||
packetLossDetected(
|
||||
nullptr,
|
||||
Field(
|
||||
&InstrumentationObserver::ObserverLossEvent::lostPackets,
|
||||
UnorderedElementsAre(
|
||||
getLossPacketMatcher(true, false),
|
||||
getLossPacketMatcher(true, false),
|
||||
getLossPacketMatcher(true, false)))))
|
||||
.Times(1);
|
||||
|
||||
for (auto& callback : conn->pendingCallbacks) {
|
||||
callback();
|
||||
callback(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1973,20 +1975,22 @@ TEST_F(QuicLossFunctionsTest, TestTimeoutLossObserverCallback) {
|
||||
// expecting all packets to be lost due to timeout
|
||||
EXPECT_CALL(
|
||||
ib,
|
||||
packetLossDetected(Field(
|
||||
&InstrumentationObserver::ObserverLossEvent::lostPackets,
|
||||
UnorderedElementsAre(
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true)))))
|
||||
packetLossDetected(
|
||||
nullptr,
|
||||
Field(
|
||||
&InstrumentationObserver::ObserverLossEvent::lostPackets,
|
||||
UnorderedElementsAre(
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true),
|
||||
getLossPacketMatcher(false, true)))))
|
||||
.Times(1);
|
||||
|
||||
for (auto& callback : conn->pendingCallbacks) {
|
||||
callback();
|
||||
callback(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2034,17 +2038,19 @@ TEST_F(QuicLossFunctionsTest, TestTimeoutAndReorderLossObserverCallback) {
|
||||
// 7 just timed out
|
||||
EXPECT_CALL(
|
||||
ib,
|
||||
packetLossDetected(Field(
|
||||
&InstrumentationObserver::ObserverLossEvent::lostPackets,
|
||||
UnorderedElementsAre(
|
||||
getLossPacketMatcher(true, true),
|
||||
getLossPacketMatcher(true, true),
|
||||
getLossPacketMatcher(true, true),
|
||||
getLossPacketMatcher(false, true)))))
|
||||
packetLossDetected(
|
||||
nullptr,
|
||||
Field(
|
||||
&InstrumentationObserver::ObserverLossEvent::lostPackets,
|
||||
UnorderedElementsAre(
|
||||
getLossPacketMatcher(true, true),
|
||||
getLossPacketMatcher(true, true),
|
||||
getLossPacketMatcher(true, true),
|
||||
getLossPacketMatcher(false, true)))))
|
||||
.Times(1);
|
||||
|
||||
for (auto& callback : conn->pendingCallbacks) {
|
||||
callback();
|
||||
callback(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user