diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 20:49:13 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | bed515689a5e09ed704de9206877ec7c0a32ab3a (patch) | |
| tree | e5cd9b0e93db717328cc831ccb0d59c58d206d44 | |
| parent | 8e144c7b9342f800f0cc5ad6c367b2ab799b683e (diff) | |
| download | pardes-bed515689a5e09ed704de9206877ec7c0a32ab3a.tar.gz pardes-bed515689a5e09ed704de9206877ec7c0a32ab3a.zip | |
fs.py waits for a new file's pane to be named, not only made
pardes --wait NEWFILE reads pane/new and then writes the pane's name, two requests; the test checked /index for the name as soon as the pane showed, and a gate run caught it between them. It waits for the name now.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| -rw-r--r-- | test/fs.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1281,13 +1281,14 @@ def test(binary, quic=False): before = serials() made = subprocess.Popen([binary, '--wait', fresh.name], cwd=root, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) + # The launch makes the pane (pane/new), then names it: wait for + # the name, not the pane. deadline = time.monotonic() + 3 - while not serials() - before: + while str(fresh).encode() not in client.read('/index'): assert made.poll() is None, made.stderr.read() - assert time.monotonic() < deadline, 'a new name opened no pane' + assert time.monotonic() < deadline, 'a new name opened no pane named it' time.sleep(.01) named, = serials() - before - assert str(fresh).encode() in client.read('/index') client.write(f'/pane/{named}/body', b'new\n') execute(client, named, 'Save') client.remove(f'/pane/{named}') |
