Skip to content

e2e: stop waiting for a terminal's output when c2vm has exited - #77

Merged
fcuny merged 2 commits into
mainfrom
wt/e2e-waitfor
Oct 25, 2026
Merged

fcuny merged 2 commits into
mainfrom
wt/e2e-waitfor

Conversation

@fcuny

@fcuny fcuny commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

waitFor now fails as soon as the terminal's output ends (c2vm exited, or bootCmd stopped it at its timeout) without the text, instead of polling until its own timeout. It checks the output once more first, since the last read may have brought it. Its deadline is now a backstop, a minute after bootCmd's, and one ticker replaces a timer per poll.

Checked with throwaway tests:

  • booting a tag that doesn't exist with -t: fails in 0.72s with the terminal's output ended before "ready" showed up, and c2vm's output in the log;
  • sleep 600 while waiting for text that never comes: after 120s, c2vm still running after 2m0s, stopping it, then the same message.

make e2e passes.

Fixes #74

🤖 Generated with Claude Code

fcuny and others added 2 commits October 25, 2026 13:13
waitFor polled until its timeout even after c2vm had exited, e.g. when
the image couldn't be pulled, and the test failed 2 minutes later,
saying c2vm was still running.

Fixes #74

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When c2vm runs past its timeout, bootCmd stops it before waitFor's own
deadline, so waitFor saw the output end then too. The message now
fits both, next to bootCmd's "still running", and the deadline is a
backstop. One ticker replaces a timer per poll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fcuny
fcuny marked this pull request as ready for review October 25, 2026 20:19
@fcuny
fcuny merged commit 5febeb8 into main Oct 25, 2026
2 checks passed
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.

e2e: waitFor waits out its timeout when c2vm has already exited

1 participant