1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-05 11:21:09 +03:00

fix onBidirectionalStreamsAvailable

Summary:
fixes the arg passed to the ::onBidirectionalStreamsAvailable callback

#facebook:
i accidentally introduced a bad operator precedence bug in a refactor; this fixes that and the unit test

luckily HQSession doesn't consume the argument passed to the callback

Reviewed By: knekritz

Differential Revision: D62765762

fbshipit-source-id: 7ae206d5036fc744485736f92fd366ce99103d58
This commit is contained in:
Hani Damlaj
2024-09-17 00:11:53 -07:00
committed by Facebook GitHub Bot
parent b009969fe3
commit 07f2980f43
2 changed files with 12 additions and 8 deletions

View File

@@ -1636,13 +1636,15 @@ TEST_P(QuicTransportImplTestBase, onBidiStreamsAvailableCallback) {
EXPECT_CALL(connCallback, onBidirectionalStreamsAvailable(_))
.WillOnce(Invoke([](uint64_t numAvailableStreams) {
EXPECT_EQ(numAvailableStreams, 1);
EXPECT_EQ(numAvailableStreams, 10);
}));
transport->addMaxStreamsFrame(MaxStreamsFrame(1, /*isBidirectionalIn=*/true));
EXPECT_EQ(transport->getNumOpenableBidirectionalStreams(), 1);
transport->addMaxStreamsFrame(
MaxStreamsFrame(10, /*isBidirectionalIn=*/true));
EXPECT_EQ(transport->getNumOpenableBidirectionalStreams(), 10);
// same value max streams frame doesn't trigger callback
transport->addMaxStreamsFrame(MaxStreamsFrame(1, /*isBidirectionalIn=*/true));
transport->addMaxStreamsFrame(
MaxStreamsFrame(10, /*isBidirectionalIn=*/true));
}
TEST_P(QuicTransportImplTestBase, onBidiStreamsAvailableCallbackAfterExausted) {