gfe-relnote: In QUIC, remove SendStreamsBlocked from QuicStreamIdManager::DelegateInterface . Refactoring only, no functional change expected, not protected.
PiperOrigin-RevId: 301895558
Change-Id: I18b8eee9403b01880537fb49b62d9102cb79e22e
diff --git a/quic/core/quic_session_test.cc b/quic/core/quic_session_test.cc
index 427f7a1..e3289e9 100644
--- a/quic/core/quic_session_test.cc
+++ b/quic/core/quic_session_test.cc
@@ -327,8 +327,11 @@
}
using QuicSession::ActivateStream;
+ using QuicSession::CanOpenNextOutgoingBidirectionalStream;
using QuicSession::CanOpenNextOutgoingUnidirectionalStream;
using QuicSession::closed_streams;
+ using QuicSession::GetNextOutgoingBidirectionalStreamId;
+ using QuicSession::GetNextOutgoingUnidirectionalStreamId;
using QuicSession::zombie_streams;
private:
@@ -1211,6 +1214,41 @@
EXPECT_TRUE(session_.WillingAndAbleToWrite());
}
+TEST_P(QuicSessionTestServer, SendStreamsBlocked) {
+ if (!VersionHasIetfQuicFrames(transport_version())) {
+ return;
+ }
+ for (size_t i = 0; i < kDefaultMaxStreamsPerConnection; ++i) {
+ ASSERT_TRUE(session_.CanOpenNextOutgoingBidirectionalStream());
+ session_.GetNextOutgoingBidirectionalStreamId();
+ }
+ // Next checking causes STREAMS_BLOCKED to be sent.
+ EXPECT_CALL(*connection_, SendControlFrame(_))
+ .WillOnce(Invoke([](const QuicFrame& frame) {
+ EXPECT_FALSE(frame.streams_blocked_frame.unidirectional);
+ EXPECT_EQ(kDefaultMaxStreamsPerConnection,
+ frame.streams_blocked_frame.stream_count);
+ ClearControlFrame(frame);
+ return true;
+ }));
+ EXPECT_FALSE(session_.CanOpenNextOutgoingBidirectionalStream());
+
+ for (size_t i = 0; i < kDefaultMaxStreamsPerConnection; ++i) {
+ ASSERT_TRUE(session_.CanOpenNextOutgoingUnidirectionalStream());
+ session_.GetNextOutgoingUnidirectionalStreamId();
+ }
+ // Next checking causes STREAM_BLOCKED to be sent.
+ EXPECT_CALL(*connection_, SendControlFrame(_))
+ .WillOnce(Invoke([](const QuicFrame& frame) {
+ EXPECT_TRUE(frame.streams_blocked_frame.unidirectional);
+ EXPECT_EQ(kDefaultMaxStreamsPerConnection,
+ frame.streams_blocked_frame.stream_count);
+ ClearControlFrame(frame);
+ return true;
+ }));
+ EXPECT_FALSE(session_.CanOpenNextOutgoingUnidirectionalStream());
+}
+
TEST_P(QuicSessionTestServer, BufferedHandshake) {
// This test is testing behavior of crypto stream flow control, but when
// CRYPTO frames are used, there is no flow control for the crypto handshake.