e2e: fix CI hang — TUI tests send the retired q quit (now C-x C-c)#389
Merged
Conversation
CI has hung on every run since the rename (#385): the `restart` and `tui_smoke` e2e test binaries never finish. Root cause: - #382 retired `q` as a quit key; the global quit chord is now C-x C-c (keymap.rs). key_latency.rs was updated; restart.rs + tui_smoke.rs were not — they still `send(b"q")`. - The e2e config disables the orchestrator, so the TUI sits on the empty- fleet welcome screen where only C-x C-c quits. `q` does nothing → the TUI never exits → `wait_exit` times out. - `Tui::wait_exit` moved the child into a detached wait-thread and, on timeout, returned without killing it. `Drop` can't help (`self.child` is already taken), so the process leaks, the PTY reader stays parked, and the tokio runtime can't shut down → `cargo test` hangs forever instead of failing. Fixes: 1. restart.rs + tui_smoke.rs (x2): send `\x18\x03` (C-x C-c) to quit. 2. Tui::wait_exit: grab a clone_killer() up front and kill the child on timeout, so a TUI that won't quit becomes a fast failure, never an infinite hang. Defense against this whole class recurring. Verified locally: restart (3) + tui_smoke (2) now pass and complete in seconds. This unblocks CI for main and all open PRs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main's CI has hung on every run since the rename (#385) — the
restartandtui_smokee2e binaries never finish, so the Test step runs until the 6h job limit. This blocks all PRs (including #386). Diagnosed by reproducing locally (therestartbinary ran 10+ min) and bisecting the CI history (everything ≤ #384 passed; everything ≥ #385 hangs).Root cause
qas a quit key — the global quit chord is nowC-x C-c(keymap.rs).key_latency.rswas updated;restart.rs+tui_smoke.rswere missed and stillsend(b"q").C-x C-cquits.qnow does nothing → the TUI never exits →wait_exittimes out.Tui::wait_exitleaked the child on timeout: it moved the process into a detached wait-thread, and on timeout returned without killing it.Dropcan't help (self.childis alreadytake()n), so the process leaks, the PTY reader task stays parked, and the tokio runtime can't shut down →cargo testhangs forever instead of failing.Fix (two parts)
restart.rs+tui_smoke.rs(×2) send\x18\x03(C-x C-c) to quit.Tui::wait_exitgrabs aclone_killer()up front and kills the child on timeout, so a TUI that won't quit becomes a fast failure, never an infinite hang. This defends against the whole class recurring (a future quit-key change can fail a test, but can't wedge CI).Verified locally
Built the workspace, then ran both previously-hanging binaries under watchdogs:
restart: 3 passed (3.46s)tui_smoke: 2 passed (0.57s)Both complete in seconds with no hang. This unblocks CI for main and every open PR (e.g. #386).