Skip to content

Commit

Permalink
Cover --no-duration and restore the CI coverage percentage threshold
Browse files Browse the repository at this point in the history
In envoyproxy#366 we had to lower the coverage threshold as that PR didn't come
with the means to easily cover testing with infinite excecution
durations. Now that we have signal handling in place, we can easily
pull this off.

Fixes envoyproxy#370

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
  • Loading branch information
oschaaf committed Jun 24, 2020
1 parent 3198623 commit 06634ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions test/integration/test_integration_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions test/run_nighthawk_bazel_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 06634ee

Please sign in to comment.