Skip to content

Conversation

@MatthewMckee4
Copy link
Member

@MatthewMckee4 MatthewMckee4 commented Feb 1, 2026

Summary

  • Add create_ctrlc_handler field to ParallelTestConfig to control whether the shutdown signal handler is installed
  • Move handler setup from karva crate into karva_runner, using OnceLock for idempotent initialization
  • Remove the shutdown_rx: Option<&Receiver<()>> parameter from run_parallel_tests

This eliminates the panic when calling run_parallel_tests multiple times (e.g., in benchmarks) and cleans up the API.

Fixes #393

Test plan

  • All existing tests pass
  • New unit test test_shutdown_receiver_is_idempotent verifies idempotent initialization
  • Manual test: Run cargo run test <path> and press Ctrl+C to verify graceful shutdown

🤖 Generated with Claude Code

Add `create_ctrlc_handler` field to `ParallelTestConfig` to control
whether the shutdown signal handler is installed. This moves the
handler setup from the karva crate into karva_runner, using `OnceLock`
for idempotent initialization. The change eliminates the panic when
calling `run_parallel_tests` multiple times and removes the messy
`Option<&Receiver<()>>` parameter.

Fixes #393

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

Project Diff Results

View diff
## pydantic-settings

1c1
< test result: FAILED. 376 passed; 33 failed; 4 skipped
---
> test result: FAILED. 377 passed; 32 failed; 4 skipped

## pydantic

1c1
< test result: FAILED. 8670 passed; 1451 failed; 265 skipped
---
> test result: FAILED. 8686 passed; 1435 failed; 265 skipped

@MatthewMckee4 MatthewMckee4 merged commit 478e738 into main Feb 1, 2026
16 checks passed
@MatthewMckee4 MatthewMckee4 deleted the issue-393-ctrlc-handler-config branch February 1, 2026 14:02
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 1, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing issue-393-ctrlc-handler-config (403bee3) with main (b383518)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 5 untouched benchmarks

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.

Show project names in the project diff PR comment

2 participants