Repository navigation
test(export): clean temporary outputs on assertion failure - #1386
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add temporary directory guard crates/compositor/tests/export_timing.rs |
Adds a uniquely named temporary directory helper and tests that it removes the directory during panic unwinding. |
Use guard in export timing tests crates/compositor/tests/export_timing.rs |
Updates the gap, nonzero-timestamp, and frame-probe tests to use the helper for output paths and cleanup. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related PRs
- getopenscreen/openscreen#1379: Introduced the export timing tests that this change updates to use
TestOutputDir.
Merge Risk: 
Minimal · up to f2b23
-
The updated tests keep temporary outputs under cleanup ownership, including when a test panics. No cleanup issue needs resolution before merging.
Pre-merge checks: 
5
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 failed
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Summary
If the export gap/origin tests panic, their explicit cleanup is skipped and generated files remain in the supplied fixture directory. Use an owned temporary-directory guard for the three tests added in #1379, including the frame-count probe. The guard removes its directory on normal return and unwinding. Add a regression that simulates a failed export assertion and verifies cleanup.
Test-only follow-up to the minor cleanup suggestion in #1379. No production code or dependencies change.
Related issue
Refs #1379, review #1379 (review)
Type of change
Release impact
Desktop impact
Testing
OPENSCREEN_TEST_MEDIA=<synthetic-media> cargo test --manifest-path crates/Cargo.toml -p openscreen-compositor --test export_timing -- --test-threads=1— 15 passed with all fixture media supplied, including the new unwinding regression.git diff --checkpassed.Summary by CodeRabbit