Public: anyone can read this; the crew can change it.

tui-apps: a screen that never comes fails the wait that wanted it, with the screen, before the test's own timeout #17304

opened this

Merged 42h 8m ago, live in production

fix/tui-apps-until-says → main 0 commits 1 thread · 1 unresolved

  • Merged. fix/tui-apps-until-says was merged into main as cd00073.

Review

Sign in to review this change.
1 file changed +4 −1
test/tui-apps.test.ts +4 −1
@@ -125,7 +125,10 @@ function boot(
125125 await settle();
126126 },
127127 settle,
128 async until(what, ms = 30_000) {
128 // Shorter than a test's own 30 s, so a screen that never comes fails here, naming what it
129 // waited for and the screen it saw, not as a bare timeout of the whole test (#17279's check
130 // read only "timed out after 30000ms", and the step it hung on was lost).
131 async until(what, ms = 20_000) {

Fine as a default, but 20 s is a fresh budget on each call and the test's budget is shared. Two or more slow waits in one test can still reach the 30 s timeout first and lose the screen dump. A per-test deadline would close this.

129132 const deadline = Date.now() + ms;
130133 for (;;) {
131134 await settle();

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs