summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 03:38:59 -0300
committerGabriel Schneider <[email protected]>2026-11-21 03:42:20 -0300
commit638122f18a66669c433e332c91fc8b068019681e (patch)
tree94647bc86c9942724464aaa935b85cf8e7c68f3d
parent76565c605defb03ab6aa8300b93f306054a67efd (diff)
downloadpardes-638122f18a66669c433e332c91fc8b068019681e.tar.gz
pardes-638122f18a66669c433e332c91fc8b068019681e.zip
test: the window's upgrade test knows a client that execs: gui_upgrades expected its second window (a client of the old build) to be let go and told to upgrade; a client of a build that execs (since the clients are carried: knows_exec) comes back on the new build, the same process, so the wait for its exit timed out whenever the old build was a recent one; found by the coordinator's run from the installed build (main's ReleaseSafe) to pardes-merge46's: now the two cases, as upgrade_clients has them; from main's build 2 of 2, from the build before the exec (0.24 of 2026-11-17) 1 of 1
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
-rw-r--r--test/daemon.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/daemon.py b/test/daemon.py
index 37487a99..acfa4896 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -3051,10 +3051,20 @@ def gui_upgrades(old, new):
assert client.read(f'/pane/{text}/body') == b'one\ntwo\n'
assert alive(shell_pid) and ppid(shell_pid) == proc.pid and alive(sleeper)
wait_for('the window drawn again', lambda: frames[0].stat().st_mtime > mark)
- # The second, a client of the old build: let go and told to upgrade too.
- second.p.wait(timeout=30)
- said = second.err.read_bytes()
- assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:]
+ if knows_exec(old):
+ # The second, a client of a build that execs: the same process,
+ # on the build at its start path (upgrade_clients checks its
+ # view; here that it is carried and not let go).
+ wait_for('the second window on the new build', lambda: exe_of(second.pid) == (str(binary), True), timeout=30)
+ assert second.p.poll() is None
+ second.p.terminate()
+ second.p.wait(timeout=30)
+ else:
+ # The second, a client of a build before the exec: let go and
+ # told to upgrade too.
+ second.p.wait(timeout=30)
+ said = second.err.read_bytes()
+ assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:]
said = Replica(root / 'pardes-replica.sock').hello('win', semantics(new))
assert said == ('welcome', proc.pid, 'win'), said
os.kill(sleeper, signal.SIGTERM)