Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Unified Diff: net/quic/quic_server_session_base_test.cc

Issue 2101353003: Add a new kMIDS (Max Incoming Dynamic Streams) config option, to eventually replace kMSPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server_session_base_test.cc
diff --git a/net/quic/quic_server_session_base_test.cc b/net/quic/quic_server_session_base_test.cc
index b41afe2a08130a4bf25f90566c1aa3b47d4d74a7..96479f1251273c1960e92966bc9b398a6617b294 100644
--- a/net/quic/quic_server_session_base_test.cc
+++ b/net/quic/quic_server_session_base_test.cc
@@ -131,6 +131,9 @@ class QuicServerSessionBaseTest : public ::testing::TestWithParam<QuicVersion> {
QuicCompressedCertsCache::kQuicCompressedCertsCacheSize) {
FLAGS_quic_always_log_bugs_for_tests = true;
config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, kMaxStreamsForTest);
+ config_.SetMaxIncomingDynamicStreamsToSend(kMaxStreamsForTest);
+ QuicConfigPeer::SetReceivedMaxIncomingDynamicStreams(&config_,
+ kMaxStreamsForTest);
config_.SetInitialStreamFlowControlWindowToSend(
kInitialStreamFlowControlWindowForTest);
config_.SetInitialSessionFlowControlWindowToSend(
@@ -267,10 +270,13 @@ TEST_P(QuicServerSessionBaseTest, MaxOpenStreams) {
// streams. The server accepts slightly more than the negotiated stream limit
// to deal with rare cases where a client FIN/RST is lost.
+ if (GetParam() <= QUIC_VERSION_34) {
+ EXPECT_EQ(kMaxStreamsForTest, session_->max_open_incoming_streams());
+ }
+
// The slightly increased stream limit is set during config negotiation. It
// is either an increase of 10 over negotiated limit, or a fixed percentage
// scaling, whichever is larger. Test both before continuing.
- EXPECT_EQ(kMaxStreamsForTest, session_->max_open_incoming_streams());
session_->OnConfigNegotiated();
EXPECT_LT(kMaxStreamsMultiplier * kMaxStreamsForTest,
kMaxStreamsForTest + kMaxStreamsMinimumIncrement);
@@ -312,8 +318,10 @@ TEST_P(QuicServerSessionBaseTest, MaxAvailableStreams) {
// streams available. The server accepts slightly more than the negotiated
// stream limit to deal with rare cases where a client FIN/RST is lost.
- // The slightly increased stream limit is set during config negotiation.
- EXPECT_EQ(kMaxStreamsForTest, session_->max_open_incoming_streams());
+ if (GetParam() <= QUIC_VERSION_34) {
+ // The slightly increased stream limit is set during config negotiation.
+ EXPECT_EQ(kMaxStreamsForTest, session_->max_open_incoming_streams());
+ }
session_->OnConfigNegotiated();
const size_t kAvailableStreamLimit = session_->MaxAvailableStreams();
EXPECT_EQ(
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698