Stop ck-lsp tests leaking _test_*.rs fixtures on panic #46

Manually merged
atanabe merged 1 commit from feat/046-stop-ck-lsp-tests-leaking-test-rs-fixtures-on into master 2026-06-19 07:57:12 +02:00
Owner

Stop ck-lsp tests leaking test*.rs fixtures on panic

Touches 1 file: ck-lsp/tests/integration.rs.

Stop ck-lsp tests leaking _test_*.rs fixtures on panic Touches 1 file: `ck-lsp/tests/integration.rs`.
atanabe approved these changes 2026-06-19 07:00:31 +02:00
atanabe left a comment

Approving. I would have split ck-lsp/tests/integration.rs differently, but not enough to hold this up.

Approving. I would have split `ck-lsp/tests/integration.rs` differently, but not enough to hold this up.
@ -116,0 +131,4 @@
}
impl Drop for FixtureFile {
fn drop(&mut self) {
Owner

drop reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?

`drop` reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?
Author
Owner

Split. The decision in drop is a pure function now, with its own tests in ck-lsp/tests/integration.rs.

Split. The decision in `drop` is a pure function now, with its own tests in `ck-lsp/tests/integration.rs`.
ebrandt approved these changes 2026-06-19 07:52:12 +02:00
ebrandt left a comment

Looked through ck-lsp/tests/integration.rs as well. Fine by me.

Looked through `ck-lsp/tests/integration.rs` as well. Fine by me.
Cleanup was a best-effort `let _ = std::fs::remove_file(&file)` at the
end of each test, so a panic or timeout left the fixture untracked in
`ck-lsp/tests/`. Replace it with a `FixtureFile` RAII guard whose Drop
removes the file on every exit path — including unwinding from a
failed assertion.
atanabe manually merged commit 7f581b59f7 into master 2026-06-19 07:57:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
northgale/ckeditor!46
No description provided.