Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: reducing H2 test permutations, increasing coverage time #6753

Merged
merged 3 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions test/common/http/http2/codec_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,15 @@ 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,
// 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,
::testing::Combine(HTTP2SETTINGS_DEFAULT_COMBINE,
HTTP2SETTINGS_DEFAULT_COMBINE));
INSTANTIATE_TEST_SUITE_P(Http2CodecImplTestEdgeSettings, Http2CodecImplTestAll,
::testing::Combine(HTTP2SETTINGS_EDGE_COMBINE,
HTTP2SETTINGS_EDGE_COMBINE));

Expand Down Expand Up @@ -1001,7 +1009,9 @@ TEST_P(Http2CodecImplTest, TestLargeRequestHeadersAtMaxConfigurable) {
request_encoder_->encodeHeaders(request_headers, true);
}

TEST_P(Http2CodecImplTest, TestCodecHeaderCompression) {
// Note this is Http2CodecImplTestAll not Http2CodecImplTest, to test
// compression with min and max HPACK table size.
TEST_P(Http2CodecImplTestAll, TestCodecHeaderCompression) {
initialize();

TestHeaderMapImpl request_headers;
Expand Down
2 changes: 1 addition & 1 deletion test/run_envoy_bazel_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ BAZEL_TEST_OPTIONS="${BAZEL_TEST_OPTIONS} -c dbg --copt=-DNDEBUG"
"${BAZEL_COVERAGE}" 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
Expand Down