Repository navigation
test: isolate tracing capture from parallel callsite registration - #83
Merged
Merged
Conversation
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.
Parallel integration tests could lose tracing spans/events because scoped subscribers share a process-wide callsite interest cache with unrelated HTTP tests. This was reproduced on unmodified main (
spans = []) and also caused PR #82's macOS body-failure trace assertion to fail. The old capture-only mutex did not exclude ordinary tests registering those callsites.Move the three existing capture scenarios to
tests/tracing.rsand execute each in a fresh copy of that test binary using--exact. Parent tests remain parallel; child PID and completion-marker checks prevent inline execution or a zero-test filter from silently passing. Child failures retain stdout/stderr. All original scenario actions and assertions are preserved, and the ineffective capture lock is removed.Add three regressions for parent callsite-state isolation, child-panic diagnostics and empty-filter rejection. Production code, public APIs, dependencies and CI parallelism are unchanged. This PR is based directly on main and is independent of the Age repair in #82. Root cause and verification.
Validation on macOS arm64, Rust 1.99.1, with normal parallel test execution:
cargo test --workspace --all-targets: 567 passed, 16 ignored.cargo test --workspace --all-targets --all-features: 608 passed, 16 ignored.cargo test --workspace --all-features --doc: 2 passed.cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --all --check: passed.No
RUST_TEST_THREADS=1workaround is required. Isolation is established by process/PID and cold-callsite regressions; stress repetitions are supplementary evidence.