Skip to content

tests: add end-to-end tests checking process termination behavior#1445

Merged
qkaiser merged 1 commit intomainfrom
e2e-tests
Mar 20, 2026
Merged

tests: add end-to-end tests checking process termination behavior#1445
qkaiser merged 1 commit intomainfrom
e2e-tests

Conversation

@vlaci
Copy link
Contributor

@vlaci vlaci commented Mar 19, 2026

  • It runs only when e2e marker is passed (and in CI)
  • current error cases are marked with xfail
  • configured pytest to use strict xfail policy, failing xfail marked tests if they were to pass

In preparation for #1426, added a few end-to-end tests to assert on what behavior we want.

In a couple of sentences:

  • SIGTERM and CTRL-C in terminal should promptly terminate all processes exiting with non-0 exit code
  • Crashing handlers should terminate all processes exiting with non-0 exit code

For SIGINT handling, pexpect is used to simulate terminal behavior, when CTRL-C being propagated to all members of the foreground process group

@vlaci vlaci force-pushed the e2e-tests branch 3 times, most recently from 2f4a1f0 to bb3cb91 Compare March 19, 2026 19:06
@qkaiser qkaiser self-requested a review March 19, 2026 19:17
@qkaiser qkaiser added python Pull requests that update Python code CI/CD Pull request that updates our Github CI/CD labels Mar 19, 2026
@vlaci vlaci force-pushed the e2e-tests branch 2 times, most recently from aef2486 to 8ade0a7 Compare March 19, 2026 19:41
@vlaci
Copy link
Contributor Author

vlaci commented Mar 19, 2026

Re xpass tests in CI: It looks like there is some environment/python version specific behavior

@qkaiser
Copy link
Contributor

qkaiser commented Mar 20, 2026

Interesting behavior:

test version status
test_sigterm_terminates_promptly[single-process] 3.10 XFAIL
test_sigterm_terminates_promptly[single-process] 3.13 XFAIL
test_sigterm_terminates_promptly[multi-process] 3.10 XFAIL
test_sigterm_terminates_promptly[multi-process] 3.10 XFAIL
test_sigint_terminates_promptly[single-process] 3.10 PASSED
test_sigint_terminates_promptly[single-process] 3.13 FAILED
test_sigint_terminates_promptly[multi-process] 3.10 PASSED
test_sigint_terminates_promptly[multi-process] 3.13 PASSED
test_worker_crash_terminates_main_process[single-process] 3.10 PASSED
test_worker_crash_terminates_main_process[single-process] 3.13 PASSED
test_worker_crash_terminates_main_process[multi-process] 3.10 XFAIL
test_worker_crash_terminates_main_process[multi-process] 3.13 XFAIL

@vlaci vlaci force-pushed the e2e-tests branch 5 times, most recently from be97700 to 200fc88 Compare March 20, 2026 13:46
- It runs only when `e2e` marker is passed (and in CI)
- current error cases are marked with xfail
  tests if they were to pass
Copy link
Contributor

@qkaiser qkaiser left a comment

Choose a reason for hiding this comment

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

Cool !!

@qkaiser qkaiser added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 113273c Mar 20, 2026
23 checks passed
@qkaiser qkaiser deleted the e2e-tests branch March 20, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Pull request that updates our Github CI/CD python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants