Repository navigation
Fix the flaky export-cancel test: cancel at the second photo, not after 300 ms - #1872
Merged
Merged
Conversation
a_cancelled_export_stops_within_a_second cancelled from a timer 300 ms in. On a
machine that finishes the 12-photo batch sooner (GPU on) the batch was already
over, the cancel time was never recorded and `expect("cancelled")` panicked, at
random (1 run in 3 here).
The progress callback now cancels when the batch asks to place the second photo:
the first is written and the others are still in the lanes whatever the speed.
The test now also pins that exactly one file is placed (it asserted only fewer
than 12).
Checks: 25/25 passes with the GPU, 10/10 with CHROMAFORGE_GPU=0. Mutation: the
consumer loop and Queue::cancelled() both ignoring the flag exports all 12 and
fails the test; ignoring only the consumer-loop check survives because the lanes'
own cancel check reaches the same stop through Queue::result.
Manual: none, no user-visible change
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests_export::a_cancelled_export_stops_within_a_secondfailed at random (about 1 run in 3 here, with the GPU on). It cancelled from a timer 300 ms in; when a fast machine had already finished the 12-photo batch, the cancel time was never recorded andexpect("cancelled")panicked.The progress callback now cancels when the batch asks to place the second photo: the first photo is written and the others are still in the lanes, whatever the machine's speed. The test also now pins that exactly one file is placed (it asserted only "fewer than 12").
Test-only change (
crates/engine/src/tests_export.rs), no production code touched.Verification
CHROMAFORGE_GPU=0.Queue::cancelled()ignore the cancel flag exports all 12 photos and fails the test. (Ignoring only the consumer-loop check survives, because the lanes' own cancel check reaches the same stop throughQueue::result.)cargo xtask ci --quickon this branch after merging currentstaging: all stages pass (fmt, brand, quarantine, docs, notes, i18n, windows, clippy, heif, stamp, test, parity, layers, assets, deny, wasm, android).Manual: none, no user-visible change.
🤖 Generated with Claude Code