From 99fb5ade2a671849f00db71524e9813e119fbce9 Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Tue, 30 Apr 2019 11:44:09 -0400 Subject: [PATCH 1/2] test: reducing H2 test permutatoins Signed-off-by: Alyssa Wilk --- test/common/http/http2/codec_impl_test.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/common/http/http2/codec_impl_test.cc b/test/common/http/http2/codec_impl_test.cc index 576516b1662a..e1f6e8bc5211 100644 --- a/test/common/http/http2/codec_impl_test.cc +++ b/test/common/http/http2/codec_impl_test.cc @@ -847,7 +847,12 @@ INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestDefaultSettings, Http2CodecImplTest, ::testing::Values(Http2Settings::MIN_INITIAL_CONNECTION_WINDOW_SIZE, \ Http2Settings::MAX_INITIAL_CONNECTION_WINDOW_SIZE)) -INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestEdgeSettings, Http2CodecImplTest, +typedef Http2CodecImplTest Http2CodecImplTestAll; + +INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestDefaultSettings, Http2CodecImplTestAll, + ::testing::Combine(HTTP2SETTINGS_DEFAULT_COMBINE, + HTTP2SETTINGS_DEFAULT_COMBINE)); +INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestEdgeSettings, Http2CodecImplTestAll, ::testing::Combine(HTTP2SETTINGS_EDGE_COMBINE, HTTP2SETTINGS_EDGE_COMBINE)); @@ -1001,7 +1006,7 @@ TEST_P(Http2CodecImplTest, TestLargeRequestHeadersAtMaxConfigurable) { request_encoder_->encodeHeaders(request_headers, true); } -TEST_P(Http2CodecImplTest, TestCodecHeaderCompression) { +TEST_P(Http2CodecImplTestAll, TestCodecHeaderCompression) { initialize(); TestHeaderMapImpl request_headers; From 420ee5d43cbb564b805cdea9a732278f959330ce Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Tue, 30 Apr 2019 14:03:38 -0400 Subject: [PATCH 2/2] comment + bumping coverage time Signed-off-by: Alyssa Wilk --- test/common/http/http2/codec_impl_test.cc | 5 +++++ test/run_envoy_bazel_coverage.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/common/http/http2/codec_impl_test.cc b/test/common/http/http2/codec_impl_test.cc index e1f6e8bc5211..441bf5fdd09a 100644 --- a/test/common/http/http2/codec_impl_test.cc +++ b/test/common/http/http2/codec_impl_test.cc @@ -847,6 +847,9 @@ INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestDefaultSettings, Http2CodecImplTest, ::testing::Values(Http2Settings::MIN_INITIAL_CONNECTION_WINDOW_SIZE, \ Http2Settings::MAX_INITIAL_CONNECTION_WINDOW_SIZE)) +// Make sure we have coverage for high and low values for various combinations and permutations +// of HTTP settings in at least one test fixture. +// Use with caution as any test using this runs 255 times. typedef Http2CodecImplTest Http2CodecImplTestAll; INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestDefaultSettings, Http2CodecImplTestAll, @@ -1006,6 +1009,8 @@ TEST_P(Http2CodecImplTest, TestLargeRequestHeadersAtMaxConfigurable) { request_encoder_->encodeHeaders(request_headers, true); } +// Note this is Http2CodecImplTestAll not Http2CodecImplTest, to test +// compression with min and max HPACK table size. TEST_P(Http2CodecImplTestAll, TestCodecHeaderCompression) { initialize(); diff --git a/test/run_envoy_bazel_coverage.sh b/test/run_envoy_bazel_coverage.sh index dcb2bac1104f..e81f88afed75 100755 --- a/test/run_envoy_bazel_coverage.sh +++ b/test/run_envoy_bazel_coverage.sh @@ -53,7 +53,7 @@ BAZEL_TEST_OPTIONS="${BAZEL_TEST_OPTIONS} -c dbg --copt=-DNDEBUG" "${BAZEL_COVERAGE}" --batch test "${COVERAGE_TARGET}" ${BAZEL_TEST_OPTIONS} \ --cache_test_results=no --cxxopt="--coverage" --cxxopt="-DENVOY_CONFIG_COVERAGE=1" \ --linkopt="--coverage" --define ENVOY_CONFIG_COVERAGE=1 --test_output=streamed \ - --strategy=Genrule=standalone --spawn_strategy=standalone --test_timeout=3000 \ + --strategy=Genrule=standalone --spawn_strategy=standalone --test_timeout=4000 \ --test_arg="--log-path /dev/null" --test_arg="-l trace" # The Bazel build has a lot of whack in it, in particular generated files, headers from external