Skip to content

fix(tests): rename ~Bridge test so ctest runs it in isolation#16

Merged
Yaraslaut merged 1 commit into
masterfrom
fix/catch2-tilde-test-name
Jul 19, 2026
Merged

fix(tests): rename ~Bridge test so ctest runs it in isolation#16
Yaraslaut merged 1 commit into
masterfrom
fix/catch2-tilde-test-name

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

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 sec
  • clangcl-debug: ***Exception: SegFault
  • Linux: passed but took ~7s (abnormal for a trivial synchronous test)

Root cause

catch_discover_tests registers one ctest entry per Catch2 case and invokes the
binary with the case name as a filter:

morph_tests "~Bridge clears the reconnect handler so a later reconnect is a safe no-op"

Catch2 interprets a leading ~ as a test-spec exclusion. So this single
ctest 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 ...) so
catch_discover_tests isolates it to its own process again, and add a comment
warning against Catch2-operator-leading case names.

Verification (local)

before after
ctest entry for this case 450 test cases, 6.72s 1 test case, 0.00s
full ctest wall time 7.65s 0.84s

All 450 tests pass.

🤖 Generated with Claude Code

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

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Yaraslaut
Yaraslaut merged commit e9e3c0b into master Jul 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant