test(validation): make immediate read_until deterministic (drop prompt race)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user