Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Check rendering while paused crates/ui-egui/src/tests_slideshow.rs |
The test pauses playback before checking the current slide and both upcoming slides. It asserts the paused state and removes the elapsed-time check. |
Priority:
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix
Suggested reviewers: bitshiftza
Merge Risk: 
Minimal · up to d5afc
-
The test change preserves the intended slideshow prefetch coverage without changing production behavior.
Architecture risk: 
Low · up to d5afc
-
The change affects 1 system.
Changed systems:
cratesArchitecture concerns
No architecture-level concerns identified.Review details
-
Systems and components
- observed — crates (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in crates/ui-egui/src/tests_slideshow.rs: The test now pauses the slideshow before checking that the current slide and both upcoming slides render, and asserts that playback is paused. It removes the elapsed-time check that required those renders to finish in under 60 seconds.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
🔧 Clippy (1.99.0)
-
Clippy execution timed out
Comment @coderabbitai help to get the list of available commands.
FredApps
left a comment
There was a problem hiding this comment.
Read the whole diff, which is test-only: the slideshow prefetch test pauses the slideshow so the slide cannot come due while a slow render spans many simulated frames, and the assertion that the renders finish before the first slide is due is dropped since pausing makes it meaningless. The remaining checks still require the current and next two slides to be rendered while the first stays up. That does mean the test no longer checks the timing of the preparation. Gate and SonarCloud are green at this head. I read the code and the CI results; the app was not run.
…r races its simulated clock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing this as superseded by #2975, which rewrote Measured with the same stress run this PR used (60 runs, 8 at once, beside 4 busy loops): on the @FredApps thanks for the approval; nothing here is needed any more. |
Off
main.Problem
tests_slideshow::next_slides_are_prepared_before_they_are_duefails under load. Run 60 times at 8 at once beside 4 busy loops on currentmain, it failed 51 times, every time atassert!(h.time() - start < 60.0, "before the first is due"), and passed 9. At 4 test threads it passes.The cause is in the test, not the app. The headless harness advances its clock by 1/60 s per frame whatever the frame costs, and
step_untilsleeps 1 ms per frame. Waiting for the renders of the slide up and the next two therefore spans as many frames as the renders take in wall time. On a loaded machine they take seconds, so 3,600 frames (the slide's 60 s) pass before the renders land and the slide is due by the test's own clock. The app is right to move on then.Change
The test pauses the slideshow right after starting it. A paused slide cannot come due however many frames pass, and
wanted()inpanels/slideshow.rsasks for the slides ahead whether or not playback is paused, so the test still checks that they are rendered and that the first slide is still up. The simulated-time assertion is removed. Raising the interval would not help: the engine caps a slide at 120 s (SLIDE_MAX), which is only twice the old margin.The second half of the test (prepare off, not paused) is unchanged and does not depend on load: the slide's clock only starts once it is rendered, and it then runs 30 frames.
Not in this PR: any change to the app or to the harness's clock.
How it was checked
main, 60 runs ofcargo test -p lightcraft-ui-egui --lib tests_slideshow::next_slides_are_prepared_before_they_are_dueat 8 at once with 4 busy loops: 51 failed at the line above, 9 passed.h.step()calls (about 133 simulated seconds, the effect of a slow render) before the wait. The old test fails atbefore the first is due; the fixed test passes.cargo xtask ci: all 8 steps passed (fmt, clippy, heif, test, parity, layers, assets, wasm).Screenshots
None: test-only change.
Merging
Overlap: none. #2786 also touches
tests_slideshow.rsbut adds a different test; #2848 fixes a different slideshow test's layout shift. No new crates, no catalog or settings format change, no UI strings.Checklist
Summary by CodeRabbit