Repository navigation
test: extract duplicated subprocess crash harness into tests/common - #336
Merged
Merged
Conversation
…327) wal_test.rs and migration_matrix_test.rs carried byte-identical copies of the crash-simulation harness (CRASH_CHILD_SPAWN_LOCK, CrashTx, run_crashing_child, crash_child_entrypoint). Moved into tests/common/mod.rs so there's a single source of truth; both files now `mod common;`. Each integration test binary still compiles tests/common/mod.rs separately, so the child-process dispatch name changes from "crash_child_entrypoint" to "common::crash_child_entrypoint". The #[allow(dead_code)] on CrashTx::Explicit moves to its one definition site, since migration_matrix_test's binary still never constructs that variant. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YMWSutMLJJ7Y5b8hs9ZaCU
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
wal_test.rsandmigration_matrix_test.rscarried byte-identical copies of the subprocess crash-simulation harness (CRASH_CHILD_SPAWN_LOCK,CrashTx,run_crashing_child,crash_child_entrypoint) — extracted intotests/common/mod.rs, both files nowmod common;#[allow(dead_code)]onCrashTx::Explicitmoves to its single definition site intests/common/mod.rs, sincemigration_matrix_test's binary still never constructs that variant (each integration test binary compilestests/common/mod.rsseparately, so this isn't avoidable — but now there's one annotation instead of a stray copy)"crash_child_entrypoint"to"common::crash_child_entrypoint"to match the function's new module pathCloses #327
Test plan
cargo test --test wal_test --test migration_matrix_test— 28 tests pass under default parallelismcargo build --tests— no warnings from either filecargo clippy --all-features -- -D warnings(matches CI) — cleancargo test(full suite) — all green🤖 Generated with Claude Code
https://claude.ai/code/session_01YMWSutMLJJ7Y5b8hs9ZaCU