Skip to content

Commit

Permalink
Abort deleter thread on exception
Browse files Browse the repository at this point in the history
  • Loading branch information
KnVerey committed Oct 24, 2018
1 parent b0c14a5 commit 02b7a93
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/integration/runner_task_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def test_run_with_verify_result_fails_quickly_if_the_pod_is_deleted_out_of_band
sleep 0.1
end
end
deleter_thread.abort_on_exception = true

result = task_runner.run(run_params(log_lines: 20, log_interval: 1))
assert_task_run_failure(result)
Expand All @@ -116,10 +117,7 @@ def test_run_with_verify_result_fails_quickly_if_the_pod_is_deleted_out_of_band
/Pod status\: (Terminating|Disappeared)/,
])
ensure
if deleter_thread
deleter_thread.join # make sure we see any error messages raised in the thread
deleter_thread.kill
end
deleter_thread&.kill
end

def test_run_with_verify_result_neither_misses_nor_duplicates_logs_across_pollings
Expand Down

0 comments on commit 02b7a93

Please sign in to comment.