Commit 5d304cb
committed
Docs(topics[automation]): Wait for tmux, don't guess
why: The examples slept a fixed amount and then read the pane. Measured,
send_keys to visible in capture_pane is 100ms at the median under a
parallel test run, so the 100ms sleeps had no headroom at all -- the
"Capturing output between markers" example fails deterministically at
--reruns 0 today, and the repo default of --reruns=2 hides it. Several
checks were also searching the joined capture, which matches the command
tmux echoed onto the pane and is true before the shell has run.
what:
- Have commands signal a tmux channel and block on Server.wait_for,
which returns when the command is actually done
- Compare whole captured lines instead of searching the joined capture
- Keep sleeps only where the example is about elapsed time itself1 parent be7c8c1 commit 5d304cb
2 files changed
Lines changed: 274 additions & 168 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
| |||
0 commit comments