| Index: net/tools/quic/end_to_end_test.cc
|
| diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
|
| index c9a0a94d70f12e3809d22b4bb94458a1fe2bf3e6..affcee37034ca844f76bd58377ed5c0e16b40d2e 100644
|
| --- a/net/tools/quic/end_to_end_test.cc
|
| +++ b/net/tools/quic/end_to_end_test.cc
|
| @@ -99,7 +99,6 @@ struct TestParams {
|
| bool client_supports_stateless_rejects,
|
| bool server_uses_stateless_rejects_if_peer_supported,
|
| QuicTag congestion_control_tag,
|
| - bool auto_tune_flow_control_window,
|
| bool disable_hpack_dynamic_table,
|
| bool force_hol_blocking)
|
| : client_supported_versions(client_supported_versions),
|
| @@ -109,7 +108,6 @@ struct TestParams {
|
| server_uses_stateless_rejects_if_peer_supported(
|
| server_uses_stateless_rejects_if_peer_supported),
|
| congestion_control_tag(congestion_control_tag),
|
| - auto_tune_flow_control_window(auto_tune_flow_control_window),
|
| disable_hpack_dynamic_table(disable_hpack_dynamic_table),
|
| force_hol_blocking(force_hol_blocking) {}
|
|
|
| @@ -125,7 +123,6 @@ struct TestParams {
|
| << p.server_uses_stateless_rejects_if_peer_supported;
|
| os << " congestion_control_tag: "
|
| << QuicUtils::TagToString(p.congestion_control_tag);
|
| - os << " auto_tune_flow_control_window: " << p.auto_tune_flow_control_window;
|
| os << " disable_hpack_dynamic_table: " << p.disable_hpack_dynamic_table;
|
| os << " force_hol_blocking: " << p.force_hol_blocking << " }";
|
| return os;
|
| @@ -137,7 +134,6 @@ struct TestParams {
|
| bool client_supports_stateless_rejects;
|
| bool server_uses_stateless_rejects_if_peer_supported;
|
| QuicTag congestion_control_tag;
|
| - bool auto_tune_flow_control_window;
|
| bool disable_hpack_dynamic_table;
|
| bool force_hol_blocking;
|
| };
|
| @@ -178,79 +174,73 @@ vector<TestParams> GetTestParams() {
|
|
|
| // This must be kept in sync with the number of nested for-loops below as it
|
| // is used to prune the number of tests that are run.
|
| - const int kMaxEnabledOptions = 5;
|
| + const int kMaxEnabledOptions = 4;
|
| int max_enabled_options = 0;
|
| vector<TestParams> params;
|
| for (bool server_uses_stateless_rejects_if_peer_supported : {true, false}) {
|
| for (bool client_supports_stateless_rejects : {true, false}) {
|
| for (const QuicTag congestion_control_tag : {kRENO, kQBIC}) {
|
| - for (bool auto_tune_flow_control_window : {true, false}) {
|
| - for (bool disable_hpack_dynamic_table : {false}) {
|
| - for (bool force_hol_blocking : {true, false}) {
|
| - int enabled_options = 0;
|
| - if (force_hol_blocking) {
|
| - ++enabled_options;
|
| - }
|
| - if (congestion_control_tag != kQBIC) {
|
| - ++enabled_options;
|
| - }
|
| - if (auto_tune_flow_control_window) {
|
| - ++enabled_options;
|
| - }
|
| - if (disable_hpack_dynamic_table) {
|
| - ++enabled_options;
|
| - }
|
| - if (client_supports_stateless_rejects) {
|
| - ++enabled_options;
|
| - }
|
| - if (server_uses_stateless_rejects_if_peer_supported) {
|
| - ++enabled_options;
|
| - }
|
| - CHECK_GE(kMaxEnabledOptions, enabled_options);
|
| - if (enabled_options > max_enabled_options) {
|
| - max_enabled_options = enabled_options;
|
| - }
|
| + for (bool disable_hpack_dynamic_table : {false}) {
|
| + for (bool force_hol_blocking : {true, false}) {
|
| + int enabled_options = 0;
|
| + if (force_hol_blocking) {
|
| + ++enabled_options;
|
| + }
|
| + if (congestion_control_tag != kQBIC) {
|
| + ++enabled_options;
|
| + }
|
| + if (disable_hpack_dynamic_table) {
|
| + ++enabled_options;
|
| + }
|
| + if (client_supports_stateless_rejects) {
|
| + ++enabled_options;
|
| + }
|
| + if (server_uses_stateless_rejects_if_peer_supported) {
|
| + ++enabled_options;
|
| + }
|
| + CHECK_GE(kMaxEnabledOptions, enabled_options);
|
| + if (enabled_options > max_enabled_options) {
|
| + max_enabled_options = enabled_options;
|
| + }
|
| +
|
| + // Run tests with no options, a single option, or all the options
|
| + // enabled to avoid a combinatorial explosion.
|
| + if (enabled_options > 1 && enabled_options < kMaxEnabledOptions) {
|
| + continue;
|
| + }
|
|
|
| - // Run tests with no options, a single option, or all the options
|
| - // enabled to avoid a combinatorial explosion.
|
| - if (enabled_options > 1 && enabled_options < kMaxEnabledOptions) {
|
| + for (const QuicVersionVector& client_versions : version_buckets) {
|
| + CHECK(!client_versions.empty());
|
| + // Add an entry for server and client supporting all versions.
|
| + params.push_back(TestParams(
|
| + client_versions, all_supported_versions,
|
| + client_versions.front(), client_supports_stateless_rejects,
|
| + server_uses_stateless_rejects_if_peer_supported,
|
| + congestion_control_tag, disable_hpack_dynamic_table,
|
| + force_hol_blocking));
|
| +
|
| + // Run version negotiation tests tests with no options, or all
|
| + // the options enabled to avoid a combinatorial explosion.
|
| + if (enabled_options > 0 && enabled_options < kMaxEnabledOptions) {
|
| continue;
|
| }
|
|
|
| - for (const QuicVersionVector& client_versions : version_buckets) {
|
| - CHECK(!client_versions.empty());
|
| - // Add an entry for server and client supporting all versions.
|
| + // Test client supporting all versions and server
|
| + // supporting 1 version. Simulate an old server and
|
| + // exercise version downgrade in the client. Protocol
|
| + // negotiation should occur. Skip the i = 0 case
|
| + // because it is essentially the same as the default
|
| + // case.
|
| + for (size_t i = 1; i < client_versions.size(); ++i) {
|
| + QuicVersionVector server_supported_versions;
|
| + server_supported_versions.push_back(client_versions[i]);
|
| params.push_back(TestParams(
|
| - client_versions, all_supported_versions,
|
| - client_versions.front(), client_supports_stateless_rejects,
|
| + client_versions, server_supported_versions,
|
| + server_supported_versions.front(),
|
| + client_supports_stateless_rejects,
|
| server_uses_stateless_rejects_if_peer_supported,
|
| - congestion_control_tag, auto_tune_flow_control_window,
|
| - disable_hpack_dynamic_table, force_hol_blocking));
|
| -
|
| - // Run version negotiation tests tests with no options, or all
|
| - // the options enabled to avoid a combinatorial explosion.
|
| - if (enabled_options > 0 &&
|
| - enabled_options < kMaxEnabledOptions) {
|
| - continue;
|
| - }
|
| -
|
| - // Test client supporting all versions and server
|
| - // supporting 1 version. Simulate an old server and
|
| - // exercise version downgrade in the client. Protocol
|
| - // negotiation should occur. Skip the i = 0 case
|
| - // because it is essentially the same as the default
|
| - // case.
|
| - for (size_t i = 1; i < client_versions.size(); ++i) {
|
| - QuicVersionVector server_supported_versions;
|
| - server_supported_versions.push_back(client_versions[i]);
|
| - params.push_back(TestParams(
|
| - client_versions, server_supported_versions,
|
| - server_supported_versions.front(),
|
| - client_supports_stateless_rejects,
|
| - server_uses_stateless_rejects_if_peer_supported,
|
| - congestion_control_tag, auto_tune_flow_control_window,
|
| - disable_hpack_dynamic_table, force_hol_blocking));
|
| - }
|
| + congestion_control_tag, disable_hpack_dynamic_table,
|
| + force_hol_blocking));
|
| }
|
| }
|
| }
|
| @@ -399,10 +389,6 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
|
| if (GetParam().client_supports_stateless_rejects) {
|
| copt.push_back(kSREJ);
|
| }
|
| - if (GetParam().auto_tune_flow_control_window) {
|
| - copt.push_back(kAFCW);
|
| - copt.push_back(kIFW5);
|
| - }
|
| if (GetParam().disable_hpack_dynamic_table) {
|
| copt.push_back(kDHDT);
|
| }
|
| @@ -1622,10 +1608,8 @@ TEST_P(EndToEndTest, DifferentFlowControlWindows) {
|
| set_client_initial_stream_flow_control_receive_window(kClientStreamIFCW);
|
| set_client_initial_session_flow_control_receive_window(kClientSessionIFCW);
|
|
|
| - uint32_t kServerStreamIFCW =
|
| - GetParam().auto_tune_flow_control_window ? 32 * 1024 : 654321;
|
| - uint32_t kServerSessionIFCW =
|
| - GetParam().auto_tune_flow_control_window ? 48 * 1024 : 765432;
|
| + uint32_t kServerStreamIFCW = 32 * 1024;
|
| + uint32_t kServerSessionIFCW = 48 * 1024;
|
| set_server_initial_stream_flow_control_receive_window(kServerStreamIFCW);
|
| set_server_initial_session_flow_control_receive_window(kServerSessionIFCW);
|
|
|
| @@ -1673,10 +1657,8 @@ TEST_P(EndToEndTest, DifferentFlowControlWindows) {
|
| TEST_P(EndToEndTest, HeadersAndCryptoStreamsNoConnectionFlowControl) {
|
| // The special headers and crypto streams should be subject to per-stream flow
|
| // control limits, but should not be subject to connection level flow control
|
| - const uint32_t kStreamIFCW =
|
| - GetParam().auto_tune_flow_control_window ? 32 * 1024 : 123456;
|
| - const uint32_t kSessionIFCW =
|
| - GetParam().auto_tune_flow_control_window ? 48 * 1024 : 234567;
|
| + const uint32_t kStreamIFCW = 32 * 1024;
|
| + const uint32_t kSessionIFCW = 48 * 1024;
|
| set_client_initial_stream_flow_control_receive_window(kStreamIFCW);
|
| set_client_initial_session_flow_control_receive_window(kSessionIFCW);
|
| set_server_initial_stream_flow_control_receive_window(kStreamIFCW);
|
|
|