Repository navigation
Conversation
…bound
tests_dialog_fit::export_dialog_fits_a_short_window_and_its_button_exports
clicks Export and then waited at most 60 s of wall time for the export - real
work on background threads - to finish. On a machine that was also building
two other branches it did not ("assertion failed: h.step_until(Duration::
from_secs(60), ...)"), while alone it passes 3 of 3 in 8-9 s. Whether it
passed depended on load.
The wait now uses EXPORT_DONE, 120 s - the bound the crate uses for real
background work (SETTLE in headless.rs and the other tests_* files) - and
says which window size it was waiting for. It still ends as soon as the
export does; only a hung export takes longer to report. The file's T (20 s)
is for UI requests and stays as it is.
Test-only change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Export completion timeout crates/ui-egui/src/tests_dialog_fit.rs |
The test defines a 120-second timeout and uses it when waiting for export completion. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Possibly related issues
- Fixed wall-clock test limits under machine load: this change increases one bounded export wait, but does not add assertion context.
- Bounded and scalable test waits: this change updates one bounded wait, but does not add a shared deadline helper or time scaling.
Suggested reviewers: skylartaylor
Merge Risk: 
Minimal · up to cac8e
-
The test-only timeout adjustment does not introduce a merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names the change: the export-dialog test now waits with the crate's background-work bound. The objectives confirm the wait moves from 60 to 120 seconds, and the change is test-only in tests_dialog_fit.rs. The title is specific and matches the main change. The phrase "the crate's background-work bound" is slightly abstract, since the value itself (120 seconds) is not stated, but it still describes the real change.
-
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
What: the WIDER FACE run sets only its own score, overlap and count limits and takes every other yunet::Options field from Options::default(), with an allow for clippy::needless_update. Why: listing every field made the benchmark stop compiling as soon as Options gains a field; storytold#3092 adds one (long_edge), so whichever of storytold#3092 and this PR merged second would break the build. Evidence: origin/main + storytold#3090 + storytold#3091 + storytold#3092 + this PR at 4e658ec: cargo check exit 101, E0063 missing field long_edge in xtask/src/ai_bench/wider.rs; with this commit the same merge passes cargo check, and this branch alone passes fmt, clippy 1.95.0 / 1.99.1 -D warnings and the xtask tests.
THEtheChad
left a comment
There was a problem hiding this comment.
The diagnosis is right: a fixed wall-clock wait for real background work fails when the machine is loaded. Doubling it only moves the threshold, though, and adds another copy of the 120 s constant (SETTLE is already defined separately in at least seven test files). #3096 (LIGHTCRAFT_TIME_SCALE, scaled()) and #3083 (testkit deadline helpers) address this for every test at once; it would be better to build on those than to bump one test.
Also, this file moved to crates/ui-egui/src/tests/dialog_fit.rs in #3103, so the PR needs a rebase.
|
Thanks, agreed: a longer fixed deadline only moves the threshold, and #3096 (deadlines that scale with |
Found while testing
crates/ui-egui/src/tests_dialog_fit.rs(no existing issue):export_dialog_fits_a_short_window_and_its_button_exportsfailed withassertion failed: h.step_until(Duration::from_secs(60), ...)on a machine that was also building two other branches. Run alone it passes.Cause
The test clicks Export and then waited at most 60 s of wall time for a real export, running on background threads, to finish. That is a guess at how fast the machine is, so whether it passed depended on load.
Fix
The wait uses a new
EXPORT_DONE(120 s), the bound this crate already uses for real background work (SETTLEinheadless.rsandtests_album_picker.rs), and the assertion says which window size it was waiting for. It still ends as soon as the export does; only a hung export takes longer to report. The file'sT(20 s, for UI requests) is unchanged. Test-only: 1 file, +4 -1.Verified
cargo test -p lightcraft-ui-egui --lib tests_dialog_fit: 6 passed, 0 failed (includesexport_dialog_fits_a_short_window_and_its_button_exports,export_dialog_cancel_is_on_screen_in_a_short_window,export_dialog_is_unchanged_in_a_tall_window).cargo check --workspace --all-targets --locked,cargo fmt --checkandcargo check --target wasm32-unknown-unknown -p lightcraft-web --lockedclean.cargo clippy -p lightcraft-ui-egui --all-targets -- -D warningsclean on current stable (1.99.1).Summary by CodeRabbit