test(e2e): consolidate cross-chain bridge and messaging suites#24491
Merged
Conversation
Merges the token bridge trio (token_bridge_private, token_bridge_public.parallel, token_bridge_failure_cases) into a single token_bridge.test.ts on one shared CrossChainMessagingTest setup, converts l1_to_l2 and l2_to_l1 from .parallel fan-out to plain files with it.each tables, and updates bootstrap.sh timeouts and .test_patterns.yml flake patterns for the renamed files.
…_l2 suite Move the CrossChainMessagingTest construction out of describe scope and into beforeAll for the token_bridge, l2_to_l1, and l1_to_l2 suites. Split l1_to_l2 (~12min in CI) into two suites: l1_to_l2 keeps the duplicate-message scenario and l1_to_l2_inbox_drift holds the inbox-drift scenario, each ~6-7min. The shared L1 to L2 message helpers are extracted to message_test_helpers.ts.
PhilWindle
approved these changes
Jul 5, 2026
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.
Part of the e2e round-2 consolidation (PR 3 of 9): fewer CI containers for
single-node/cross-chain/with every asserted behavior preserved.Merges (old → new)
token_bridge_private.test.ts+token_bridge_public.parallel.test.ts+token_bridge_failure_cases.test.ts→token_bridge.test.ts: oneCrossChainMessagingTestsetup inbeforeAll(withstartProverNode: true, covering all three), withdescribe('private'),describe('public'),describe('failure cases'). The public file previously re-ran the full harness setup per it viabeforeEach.l1_to_l2.parallel.test.ts→l1_to_l2.test.ts+l1_to_l2_inbox_drift.test.ts:beforeEachfull setup converted to a singlebeforeAllper file; the scenarios converted toit.each(['private','public'])tables. Split by scenario (see timings below):l1_to_l2.test.tskeeps the duplicate-message-from-non-registered-portal scenario,l1_to_l2_inbox_drift.test.tsholds the inbox-drift scenario (which resets themarkProvenEnabledgate between its viabeforeEach).l2_to_l1.parallel.test.ts→l2_to_l1.test.ts: dropped the.parallelsuffix; the two message-count-shape its ([3,4]and[3,1,2]) tableized viait.eachwith per-row consume tuples; the reorg-and-remine, mixed private/public, no-message-tx, and multi-block-checkpoint its kept explicit and behaviorally unchanged.Harness construction
new CrossChainMessagingTest(...)for every suite now lives as the first statement ofbeforeAllrather than atdescribescope, so nothing is constructed at test-registration time. Registration-time data (theit.eachscope tables) is static, and test bodies read offtlazily.sendMessageToL2,advanceBlock,waitForMessageFetched,waitForMessageReady) used by bothl1_to_l2files are extracted tomessage_test_helpers.ts. Each suite plugs in its own proving policy via amarkAsProvendependency (unconditional for the duplicate-message suite; gated for the inbox-drift suite).Container count
.parallelper-it containers), each paying a full node bootstrap.Timings (why l1_to_l2 was split)
Measured from the last full CI run on this branch (commit
ba5e29b):token_bridge.test.ts: 463s (~7.7 min)l2_to_l1.test.ts: 384s (~6.4 min)l1_to_l2.test.ts: 738s (~12.3 min) — over the ~10 min target, so splitl1_to_l2's four its broke down as: duplicate-message private 149s / public 162s; inbox-drift private 194s / public 172s (setup + teardown ~59s). Splitting by scenario yieldsl1_to_l2(~6 min) andl1_to_l2_inbox_drift(~7 min), both comfortably under 10 min, without resorting to the.parallelsuffix.Assertion mapping
itmoved intact to exactly one file..test_patterns.ymlflake-pattern regexes repointed from the three old bridge file names totoken_bridge; thel1_to_l2prefix regex already covers both newl1_to_l2*files.bootstrap.sh: 25m per-container timeout overrides for the four cross-chain files (bodies run serially in one container each). The glob picks up the new file names unchanged.Notes
#include_codereferences any of the renamed files, so no docs changes.single-node/README.mdstill lists the old cross-chain file names (it was already stale); left untouched to avoid conflicting with the sibling consolidation PRs — follow-up sweep will refresh it.