Skip to content

fix(e2e): graceful TracingSink shutdown and unique subtest names - #16

Open
syjn99 wants to merge 2 commits into
developfrom
fix/e2e-tracing-sink-and-subtest-names
Open

fix(e2e): graceful TracingSink shutdown and unique subtest names#16
syjn99 wants to merge 2 commits into
developfrom
fix/e2e-tracing-sink-and-subtest-names

Conversation

@syjn99

@syjn99 syjn99 commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • TracingSink graceful shutdown: Added a done chan struct{} field. initializeSink defers close(ts.done) so the goroutine signals completion when it exits. Stop() now calls cancel() then blocks on <-ts.done, ensuring the HTTP server has fully released port 9150 before the next test starts.
  • Unique subtest names: Wrapped the syncEvaluators loops in testCheckpointSync and testBeaconChainSync inside t.Run("checkpoint_sync", ...) and t.Run("beacon_chain_sync", ...) respectively. This prevents Go's testing framework from appending #01 suffixes to duplicate evaluator subtest names across the two functions.

Test plan

  • Verify go build ./testing/endtoend/... passes
  • Run E2E tests with --test_sync and --test_checkpoint_sync enabled and confirm no port-already-in-use errors on the second test
  • Confirm subtest names in output are checkpoint_sync/FinishedSyncing and beacon_chain_sync/FinishedSyncing (no #01 suffixes)

🤖 Generated with Claude Code

Add a done channel to TracingSink so Stop() blocks until initializeSink
returns, preventing port 9150 bind conflicts between tests.

Wrap checkpoint_sync and beacon_chain_sync evaluator loops in named
t.Run blocks so Go's testing framework doesn't deduplicate evaluator
subtest names by appending #1 suffixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@syjn99
syjn99 force-pushed the fix/e2e-tracing-sink-and-subtest-names branch from c4ba005 to fd1df44 Compare March 4, 2026 16:02
…eckpoint sync

The AllNodesHaveSameHead evaluator has an internal waitForAllMidEpoch
delay that creates a race condition: after waitForMatchingHead confirms
heads match, the mid-epoch wait allows the chain to advance while the
checkpoint-synced node lags behind, causing head block root mismatches.

Replace it with a second waitForMatchingHead call that actively polls
until heads match, eliminating the timing gap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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