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

fix: make sure that cargo test can be killed with ctrl+c #6803

Merged
merged 1 commit into from
May 13, 2022

Conversation

matklad
Copy link
Contributor

@matklad matklad commented May 13, 2022

I am not sure why we were catching ctrl+c in the first place. This was
introduced in #4229 I think. But messing up with signal handlers in
tests doesn't feel right and, indeed, prevents tests from being killed.

Test Plan

Manual testing: running cargo t -p integration-tests and then killing
it in the middle with ctrl+c leaves the test running in the background
before this PR, and properly kills the process after.

I am not sure why we were catching ctrl+c in the first place. This was
introduced in near#4229 I think. But messing up with signal handlers in
tests doesn't feel right and, indeed, prevents tests from being killed.

Test Plan
---------

Manual testing: running `cargo t -p integration-tests` and then killing
it in the middle with ctrl+c leaves the test running in the background
before this PR, and properly kills the process after.
@matklad matklad requested review from miraclx and mina86 May 13, 2022 19:05
@matklad matklad marked this pull request as ready for review May 13, 2022 19:05
@matklad matklad requested a review from a team as a code owner May 13, 2022 19:05
Copy link
Contributor

@miraclx miraclx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, before manually handling signals in #4229, the tests always kept running after ctrl-c. Which is why a manual attempt at cancelling the tasks on signal detection was needed.

But if it works now, then great.

@near-bulldozer near-bulldozer bot merged commit c03a37e into near:master May 13, 2022
nikurt pushed a commit that referenced this pull request May 17, 2022
I am not sure why we were catching ctrl+c in the first place. This was
introduced in #4229 I think. But messing up with signal handlers in
tests doesn't feel right and, indeed, prevents tests from being killed.

Test Plan
---------

Manual testing: running `cargo t -p integration-tests` and then killing
it in the middle with ctrl+c leaves the test running in the background
before this PR, and properly kills the process after.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants