Skip to content

test(ssh-pool): wait for the parked runner by retries, not wall time - #983

Merged
umputun merged 3 commits into
masterfrom
ssh-pool-held-wait
Nov 12, 2026
Merged

umputun merged 3 commits into
masterfrom
ssh-pool-held-wait

Conversation

@umputun

@umputun umputun commented Nov 12, 2026

Copy link
Copy Markdown
Owner

four SshConnectionPoolTests cases failed the Linux core job on master (run https://github.com/umputun/agterm/actions/runs/43281980528) with await held() false. held() gave the stub runner 5 s of wall-clock time to park, and every Linux run opens with a scheduling stall in which trivial main-actor tests report 22 to 33 s, so the deadline could expire before the runner parked. held() now gives up after 1000 Task.yield retries, so time spent suspended no longer exhausts its budget.

a local reproduction in the CI image (swift:6.3.2-noble, 4 pinned CPUs) reached the main actor in 0.7 s, then took 14.2 s to resume after MainActor.run. Stacks showed HudHelperTests and OverlayRunJobTests occupying concurrency worker threads with synchronous waits. docs/ci-flakes.md records the measurements and their limits; the startup stall itself remains, and moving those waits off the pool is filed in docs/backlog/blocking-test-waits-hold-concurrency-workers.md.

four `SshConnectionPoolTests` cases failed on the Linux job with `await held()`
false. `held()` gave the stub runner 5 s of wall-clock time to park, and every
Linux run opens with a scheduling stall where trivial main-actor tests report
22 to 33 s, so the deadline could expire before the runner parked. `held()` now
gives up after 1000 `Task.yield` retries, so time spent suspended no longer
exhausts its budget.

a local Linux reproduction in the CI image reached the main actor in 0.7 s,
then took 14.2 s to resume after `MainActor.run`. Stacks also showed
synchronous test waits occupying worker threads. The startup stall remains;
docs/ci-flakes.md records the measurements and their limits.
HudHelperTests and OverlayRunJobTests occupy Swift concurrency worker threads
with Thread.sleep polling and a semaphore wait during the Linux start-of-run
stall. Moving them off the pool changes fixture cleanup in two suites and needs
its own before/after measurement, so it waits.
Copilot AI balanced review requested due to automatic review settings November 12, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@umputun
umputun merged commit 49ce399 into master Nov 12, 2026
10 checks passed
@umputun
umputun deleted the ssh-pool-held-wait branch November 12, 2026 21:01
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.

2 participants