Skip to content

[split] Refactor / cleanup — from #21#28

Closed
pull-apart[bot] wants to merge 1 commit into
mainfrom
split-pr-21-1782310171-refactor
Closed

[split] Refactor / cleanup — from #21#28
pull-apart[bot] wants to merge 1 commit into
mainfrom
split-pr-21-1782310171-refactor

Conversation

@pull-apart

@pull-apart pull-apart Bot commented Jun 24, 2026

Copy link
Copy Markdown

Automated split from #21.

Context

This is the refactor / cleanup half of an automated split from #21.

Changes in this PR:

  • utilities/unittests/test_console.py: Added SingleAttemptTimeoutSampler helper class for testing TimeoutSampler interactions
  • Updated test_console_disconnect_terminated_child to check _proc.poll() instead of child.terminated
  • Updated test_console_disconnect_terminated_child to mock and assert the parameterless console_eof_sampler() call
  • Updated test_console_eof_sampler_success and test_console_eof_sampler_no_sample to reflect changes in console_eof_sampler() signature and internal call to _spawn_console()
  • Added test_spawn_console_success to verify correct creation of fdspawn and storage of subprocess handle
  • Added test_spawn_console_popen_failure to verify resource cleanup when subprocess.Popen fails
  • Added test_spawn_console_fdspawn_failure to verify resource cleanup when fdspawn creation fails
  • Added test_terminate_proc_already_exited to verify _terminate_proc() handles already exited processes
  • Added test_terminate_proc_graceful_shutdown to verify _terminate_proc() sends terminate signal
  • Added test_terminate_proc_force_kill to verify _terminate_proc() force kills unresponsive processes
  • Added test_connect_error_cleanup to verify _terminate_proc() is called on connect failure
  • Added test_disconnect_cleanup to verify _terminate_proc() is called on disconnect
How this split maps your changes
  • Refactor branch (split-pr-21-1782310171-refactor): files classified as cleanup / mechanical work:
    • utilities/unittests/test_console.py
  • Main branch (split-pr-21-1782310171-main): files classified as feature / behavior work:
    • utilities/console.py

Merge order

Merge the refactor PR first if it touches shared files or would conflict with the main PR; then merge the main PR. Resolve conflicts in the usual way if both branches touch the same lines.

Main PR: #29

To close this PR and delete its branch, comment @pull-apart /close.

@RoniKishner

Copy link
Copy Markdown
Owner

@pull-apart /close

@pull-apart pull-apart Bot closed this Jun 24, 2026
@pull-apart pull-apart Bot deleted the split-pr-21-1782310171-refactor branch June 24, 2026 14:44
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.

1 participant