Skip to content

test: keep the interrupt test's own Ctrl-C inside its try - #522

Merged
tae898 merged 1 commit into
mainfrom
test/512-sigint-inside-try
Nov 27, 2026
Merged

tae898 merged 1 commit into
mainfrom
test/512-sigint-inside-try

Conversation

@tae898

@tae898 tae898 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

The interrupt test started its signal timer before the try and cleaned up in a finally, so a signal raised outside the statement could leave the test and stop the whole pytest run. Both loops (in process and in the child process) now start, run, and clean up inside one try that catches KeyboardInterrupt. Only the test changes.

Related issues

Closes #512

Performance changes

None.

Docs

None needed.

Checklist

  • A regression test fails on the old code and passes on the new: the failure is a timing race that I saw once and did not reproduce
  • The test suite that the change can affect passes (the checks of this pull request)
  • uvx pre-commit run --files <changed files> passes

The timer was started before the try, and its cancel and join ran in a finally, so a signal raised while the main thread waited in start() or in the cleanup left the test and stopped the whole pytest run (seen once on main, linux/amd64, Python 3.13, run 45959878115). Both loops (in process and in the child process) now catch it wherever it is raised from start() on.

Closes #512
@tae898 tae898 added bug Something isn't working jvm The arcadedb-jvm package (JPype build) labels Nov 27, 2026
@tae898 tae898 self-assigned this Nov 27, 2026
@tae898
tae898 merged commit e2aaf25 into main Nov 27, 2026
25 checks passed
@tae898
tae898 deleted the test/512-sigint-inside-try branch November 27, 2026 12:11
@github-actions github-actions Bot added this to the 26.12.1 milestone Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working jvm The arcadedb-jvm package (JPype build)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The interrupt test can let its own Ctrl-C escape and abort the whole test run

1 participant