From f62ea10d24788001892c6d2df0fad9943b1b3617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Mon, 15 Jun 2026 23:17:14 +0200 Subject: [PATCH] test(validation): make immediate read_until deterministic (drop prompt race) Co-Authored-By: Claude Opus 4.8 --- test/validation/items/common/conditional/test.tum | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/validation/items/common/conditional/test.tum b/test/validation/items/common/conditional/test.tum index 22abc54..166b628 100644 --- a/test/validation/items/common/conditional/test.tum +++ b/test/validation/items/common/conditional/test.tum @@ -47,13 +47,15 @@ {% endif %} - read_until: {expected: terminal loaded, timeout: 5} +# Echo two tokens on one line so both are buffered together; the immediate +# (timeout 0) reads below match buffered data with no race on the async prompt. - console: name: Console write condition: <| $(conditional_exec) == 1 |> console_name: consname key: $(test)_PASS steps: - - writeln: echo 0 + - writeln: echo ALPHA BETA - sleep: name: sleep item @@ -67,9 +69,9 @@ key: $(test)_PASS steps: {% if os == "Windows" %} - - read_until: {expected: echo 0, timeout: 0} + - read_until: {expected: echo ALPHA BETA, timeout: 0} {% endif %} - - read_until: {expected: "0", timeout: 0} + - read_until: {expected: ALPHA, timeout: 0} - console: name: Console read_until immediate (2) @@ -77,7 +79,7 @@ console_name: consname key: $(test)_PASS steps: - - read_until: {expected: "$(terminal_prompt)", timeout: 0} + - read_until: {expected: BETA, timeout: 0} - console: name: Console closure