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 %}
|
{% endif %}
|
||||||
- read_until: {expected: terminal loaded, timeout: 5}
|
- 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:
|
- console:
|
||||||
name: Console write
|
name: Console write
|
||||||
condition: <| $(conditional_exec) == 1 |>
|
condition: <| $(conditional_exec) == 1 |>
|
||||||
console_name: consname
|
console_name: consname
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
- writeln: echo 0
|
- writeln: echo ALPHA BETA
|
||||||
|
|
||||||
- sleep:
|
- sleep:
|
||||||
name: sleep item
|
name: sleep item
|
||||||
@@ -67,9 +69,9 @@
|
|||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
{% if os == "Windows" %}
|
{% if os == "Windows" %}
|
||||||
- read_until: {expected: echo 0, timeout: 0}
|
- read_until: {expected: echo ALPHA BETA, timeout: 0}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- read_until: {expected: "0", timeout: 0}
|
- read_until: {expected: ALPHA, timeout: 0}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console read_until immediate (2)
|
name: Console read_until immediate (2)
|
||||||
@@ -77,7 +79,7 @@
|
|||||||
console_name: consname
|
console_name: consname
|
||||||
key: $(test)_PASS
|
key: $(test)_PASS
|
||||||
steps:
|
steps:
|
||||||
- read_until: {expected: "$(terminal_prompt)", timeout: 0}
|
- read_until: {expected: BETA, timeout: 0}
|
||||||
|
|
||||||
- console:
|
- console:
|
||||||
name: Console closure
|
name: Console closure
|
||||||
|
|||||||
Reference in New Issue
Block a user