summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/daemon.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/test/daemon.py b/test/daemon.py
index d1b64843..3dfb0710 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -4046,6 +4046,10 @@ def upgrades(old, new):
client = reconnect(sock)
took = time.monotonic() - t
assert int(dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines())['pid']) == session
+ # The word said on the notice row (pick-ui SPEC §10.3) until the
+ # next message: looked for before the test says any (the Undo's
+ # echo below retires it, §10.1).
+ wait_for('the word said', lambda: 'Upgrade: now pardes' in screen_text(client))
if procfs:
wait_for('the daemon on the new build', lambda: exe_of(daemon) == (str(binary), True))
else:
@@ -4111,7 +4115,6 @@ def upgrades(old, new):
(stub2.poll() is not None and (b'detached from' in term2.text() or b'upgrade this client too' in term2.text()
or b'run the same pardes at both ends' in term2.text())),
timeout=30)
- wait_for('the word said', lambda: 'Upgrade: now pardes' in screen_text(client))
# Two clients' views kept at the Upgrade, with the time (views.away),
# whose clients never come back (the raw replica, the old build's):
# each its client's for 30 s, and the session's views all taken.
@@ -4171,7 +4174,9 @@ def upgrades(old, new):
t0 = time.monotonic()
client.write(f'/pane/{shell}/exec', b'Upgrade\n')
client.socket.close()
- client = saying(sock, 'it goes on as')
+ # The outcome's words as the notice row shows a long message:
+ # its start, cut on the right with `…` (pick-ui SPEC §10.3).
+ client = saying(sock, 'could not load this session')
back = time.monotonic() - t0
joined = {}
@@ -4186,10 +4191,15 @@ def upgrades(old, new):
raise TimeoutError(f'the client joined again: not {[c.stem for _, c in owners if c not in joined]} '
f'{time.monotonic() - t0:.1f} s after the Upgrade, the session back at {back:.1f} s') from None
assert again.poll() is None and again5.poll() is None
- # The session's news: each client's own screen says it (a long
- # message shows its end), not only the view whose input came
- # last before the Upgrade's step.
- wait_for("each client's own screen saying the Upgrade's outcome", lambda: all(b'it goes on as' in t.text() for t, _ in owners), timeout=15)
+ # The session's news: each client's own screen says it, not only
+ # the view whose input came last before the Upgrade's step: on
+ # its notice row (pick-ui SPEC §10.3; a long message shows its
+ # start), once a key of its own has put away the client's own
+ # word drawn over that row (`joined again: ...`, tui.zig
+ # noticeLine; replica.zig Link.input).
+ for t, check in owners:
+ made_live(t, check)
+ wait_for("each client's own screen saying the Upgrade's outcome", lambda: all(b'could not load this session' in t.text() for t, _ in owners), timeout=15)
for (t, check), pane, theirs in zip(owners, mine, reversed(mine)):
in_own_view('its own view again', lambda: made_live(t, check), client, pane, theirs)
for c, t in ((again, term4), (again5, term5)):
@@ -4208,7 +4218,7 @@ def upgrades(old, new):
refusing('all')
client.write(f'/pane/{shell}/exec', b'Upgrade\n')
client.socket.close()
- client = saying(sock, 'brings the rest back')
+ client = saying(sock, 'no build could load the session')
# The dump stays in the state file, under its label (a second
# upgrade of one pid is `upgrade-<pid>-2`).
kept = client.read('/dumps').decode()