Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b973b75
Extract SignalHandler
oschaaf Jan 15, 2020
fb5c434
Remove accidentally left in comment
oschaaf Jan 15, 2020
1bd1d31
Fix format
oschaaf Jan 15, 2020
fcba594
Merge remote-tracking branch 'upstream/master' into extract-signal-ha…
oschaaf Jan 15, 2020
ce5ead6
Amend according to clang-tidy's complaints
oschaaf Jan 15, 2020
3f99119
Pass const ref
oschaaf Jan 15, 2020
111ba5d
Merge remote-tracking branch 'upstream/master' into extract-signal-ha…
oschaaf Jan 16, 2020
89dfdf6
Merge remote-tracking branch 'upstream/master' into extract-signal-ha…
oschaaf Jun 10, 2020
c457af6
Merge remote-tracking branch 'upstream/master' into extract-signal-ha…
oschaaf Jun 15, 2020
04eec56
CLI: Handle signals, allow cancellation of executions
oschaaf Jun 17, 2020
a11050f
Add lock guarding of the cancellation process + tests
oschaaf Jun 17, 2020
781df87
Merge remote-tracking branch 'upstream/master' into execution-cancell…
oschaaf Jun 18, 2020
2c04d10
s/cancel_requests/graceful_stop_requested/
oschaaf Jun 18, 2020
55f694f
Eliminate the NullTerminationPredicate: dead code
oschaaf Jun 18, 2020
d1a696b
Remove debug print line
oschaaf Jun 18, 2020
3c35f86
Merge remote-tracking branch 'upstream/master' into execution-cancell…
oschaaf Jun 19, 2020
9e0d9b2
Merge remote-tracking branch 'upstream/master' into execution-cancell…
oschaaf Jun 19, 2020
57d71f0
Merge remote-tracking branch 'upstream/master' into execution-cancell…
oschaaf Jun 22, 2020
1fddbec
Partially address review feedback
oschaaf Jun 22, 2020
20e6108
Review feedback pt II
oschaaf Jun 22, 2020
3198623
Review feedback
oschaaf Jun 22, 2020
06634ee
Cover --no-duration and restore the CI coverage percentage threshold
oschaaf Jun 24, 2020
de205d5
Test proto to option roundtrip conversion
oschaaf Jun 24, 2020
ef3d3b3
Merge remote-tracking branch 'upstream/master' into restore-coverage-…
oschaaf Jun 24, 2020
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
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
12 changes: 12 additions & 0 deletions test/options_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<OptionsImpl> 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.
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