summaryrefslogtreecommitdiff
path: root/test/fs.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 20:49:13 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitbed515689a5e09ed704de9206877ec7c0a32ab3a (patch)
treee5cd9b0e93db717328cc831ccb0d59c58d206d44 /test/fs.py
parent8e144c7b9342f800f0cc5ad6c367b2ab799b683e (diff)
downloadpardes-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]>
Diffstat (limited to 'test/fs.py')
-rw-r--r--test/fs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/fs.py b/test/fs.py
index 36ba180d..06643385 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -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}')