Repository navigation
TST make the flat-keyframe render-size test robust on slow machines - #764
Conversation
WebApp.send returns None when the page takes longer than 2 s to answer, which a busy page on a slow CI runner (software WebGL) can. The test read the keyframes while its render was still drawing, so it failed intermittently. Read back after the render's download arrives, and retry reads through a new _js_query helper. Type-annotate _js_run and _js_query.
|
Claude finished @jwparks's task in 22s —— View job Review of PR #764: make the flat-keyframe render-size test robust on slow machines
Verdict: looks good. I have a few non-blocking suggestions. What I checked
Suggestions (non-blocking)
No functional issues found. I did not run the test suite, because it needs Playwright Chromium and a slow-machine reproduction. |
|
I tested this commit locally. To mimic a slow CI runner, I pinned the test to fewer CPU cores:
Before this PR, the test failed every time on one core with the same TypeError we saw in CI. Overall, looks good to me! |
|
From Claude's review:
I think this is clear from the implementation of
This is true, but I think the 2-sec. sleep was chosen because of synchronization issues. I will address this in a later PR that can hopefully tighten all of the sleeps.
See above -- hopefully this will be less of an issue in the future.
We don't have strict style guidelines, so I'm going to ignore this. |
test_changing_the_render_size_reframes_flat_keyframesfailed often but inconsistenly on CI withTypeError: 'NoneType' object is not subscriptable(e.g. on this failed run).WebApp.sendgives up after 2 s and returnsNone. The test previously read the keyframes right after starting a render. On a slow machine (like our CI) the page was still busy drawing the frame and didn't answer in time.Changes:
_js_queryhelper that retries a read until the page answers, for up to 60 s.With these changes, the test reliably passes with fewer cores.