diff --git a/test/integration/test_integration_basics.py b/test/integration/test_integration_basics.py index d82fdb478..6247a0d96 100644 --- a/test/integration/test_integration_basics.py +++ b/test/integration/test_integration_basics.py @@ -666,14 +666,13 @@ def _send_sigterm(process): process.terminate() -def test_cancellation(http_test_server_fixture): +def test_cancellation_with_infinite_duration(http_test_server_fixture): """ Make sure that we can use signals to cancel execution. """ args = [ http_test_server_fixture.nighthawk_client_path, "--concurrency", "2", - http_test_server_fixture.getTestServerRootUri(), "--duration", "1000", "--output-format", - "json" + http_test_server_fixture.getTestServerRootUri(), "--no-duration", "--output-format", "json" ] client_process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) Thread(target=(lambda: _send_sigterm(client_process))).start() diff --git a/test/options_test.cc b/test/options_test.cc index c78cb651d..102d67acf 100644 --- a/test/options_test.cc +++ b/test/options_test.cc @@ -232,6 +232,18 @@ TEST_F(OptionsImplTest, RequestSource) { EXPECT_TRUE(util(*(options_from_proto.toCommandLineOptions()), *cmd)); } +// We test --no-duration here and not in All above because it is exclusive to --duration. +TEST_F(OptionsImplTest, NoDuration) { + Envoy::MessageUtil util; + std::unique_ptr options = TestUtility::createOptionsImpl( + fmt::format("{} --no-duration {}", client_name_, good_test_uri_)); + EXPECT_TRUE(options->noDuration()); + // Check that our conversion to CommandLineOptionsPtr makes sense. + CommandLineOptionsPtr cmd = options->toCommandLineOptions(); + OptionsImpl options_from_proto(*cmd); + EXPECT_TRUE(util(*(options_from_proto.toCommandLineOptions()), *cmd)); +} + // This test covers --tls-context, which can't be tested at the same time as --transport-socket. // We test --tls-context here and not in AlmostAll above because it is mutually // exclusive with --transport-socket. diff --git a/test/run_nighthawk_bazel_coverage.sh b/test/run_nighthawk_bazel_coverage.sh index 849caa8df..8b48f4eec 100755 --- a/test/run_nighthawk_bazel_coverage.sh +++ b/test/run_nighthawk_bazel_coverage.sh @@ -43,8 +43,7 @@ COVERAGE_VALUE=${COVERAGE_VALUE%?} if [ "$VALIDATE_COVERAGE" == "true" ] then - # TODO(#370): restore the coverage threshold. - COVERAGE_THRESHOLD=98.4 + COVERAGE_THRESHOLD=98.6 COVERAGE_FAILED=$(echo "${COVERAGE_VALUE}<${COVERAGE_THRESHOLD}" | bc) if test ${COVERAGE_FAILED} -eq 1; then echo Code coverage ${COVERAGE_VALUE} is lower than limit of ${COVERAGE_THRESHOLD}