fix(tests): rename ~Bridge test so ctest runs it in isolation#16
Merged
Conversation
catch_discover_tests passes each Catch2 case name to the test binary as a filter. Catch2 reads a leading '~' as an *exclusion* pattern, so the case "~Bridge clears the reconnect handler..." caused its ctest entry to run the entire suite MINUS itself in a single process. That masked the real result and, on Windows debug builds, tripped a latent cross-test crash/hang (SEGFAULT on clangcl, 120s timeout on cl) that was misattributed to this test. Each other platform just silently ran ~450 tests in one process (~7s). Rename the case to start with a normal word so catch_discover_tests isolates it to its own process again, and add a note warning against Catch2-operator-leading case names. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
Windows debug CI (
cl-debug,clangcl-debug) failed on the test~Bridge clears the reconnect handler so a later reconnect is a safe no-op:cl-debug:***Timeout 120.00 secclangcl-debug:***Exception: SegFaultRoot cause
catch_discover_testsregisters one ctest entry per Catch2 case and invokes thebinary with the case name as a filter:
Catch2 interprets a leading
~as a test-spec exclusion. So this singlectest entry ran the entire suite minus itself (
2747 assertions in 450 test cases) in one process. Running ~450 tests in a single process tripped a latent,Windows-only cross-test crash/hang — misattributed to this test. Every other
platform silently paid the ~7s cost.
Fix
Rename the case to start with a normal word (
Bridge destructor clears ...) socatch_discover_testsisolates it to its own process again, and add a commentwarning against Catch2-operator-leading case names.
Verification (local)
450 test cases, 6.72s1 test case, 0.00sctestwall timeAll 450 tests pass.
🤖 Generated with Claude Code