chore(composer): improve blackbox test efficiency #1925
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.
Summary
Improves composer testing efficiency by manually ticking the executor's block timer to preempt bundle submission instead of waiting.
Background
Previously,
loop_until_composer_is_ready()
had a minimum of a 1 second delay, which many of the blackbox tests became reliant on to trigger bundle submission. This change removes the delay in looping until composer is ready, opting to manually tick the block timer viatokio::time
.Changes
loop_until_composer_is_ready()
in favor oftokio::task::yield_now()
.TestComposer
methodtick_block_timer
, which sleeps for 10ms to allow for tx submission from the rollup before ticking the block timer (lowest latency I found to be consistently successful), then advances time byblock_time_ms
to trigger bundle submission.tick_block_timer
Testing
All tests passing consistently, blackbox tests now run consistently within ~2s locally.
Changelogs
No updates required.
Related Issues
closes #1920