Skip to content

refactor: introduce generic ChainIndexerStream test harness for integration tests - #1091

Draft
isSerge wants to merge 4 commits into
developfrom
isserge/refactor-chain-integration-tests
Draft

refactor: introduce generic ChainIndexerStream test harness for integration tests#1091
isSerge wants to merge 4 commits into
developfrom
isserge/refactor-chain-integration-tests

Conversation

@isSerge

@isSerge isSerge commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reduce duplication across integration tests by replacing three Running{Ethereum,Solana,Canton}Indexer structs with unified ChainIndexerStream test harness (generic over impl ChainIndexer):

  • start(indexer, catchup_timeout) - spawns run(), waits for CatchupCompleted, buffers any earlier events
  • next_event() - replays buffered events first, then drains the channel
  • next_event_within(duration) - spins on a closed channel until timeout
  • wait_for(predicate, duration) - first matching event; bails if the stream closes.
  • expect_none_within(duration) - negative assertion (covers the raw sign_rx.recv() timeout pattern).
  • Drop cancels + aborts

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