Skip to content

[Testing] Fix flaky TestFailedTxWillNotChangeStateCommitment - #8639

Open
janezpodhostnik wants to merge 1 commit into
janez/flaky-test-restore-behavioral-boundsfrom
janez/fix-flaky-execution-receipt-wait
Open

[Testing] Fix flaky TestFailedTxWillNotChangeStateCommitment#8639
janezpodhostnik wants to merge 1 commit into
janez/flaky-test-restore-behavioral-boundsfrom
janez/fix-flaky-execution-receipt-wait

Conversation

@janezpodhostnik

@janezpodhostnik janezpodhostnik commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

TestFailedTxWillNotChangeStateCommitment flaked once in a 10x full-suite campaign: its
second receipt wait (hub.DeliverAllEventually, waiting for 3 execution receipts) hit the
10s timeout. Typical runtime is ~5.5s with a tight distribution, so the pipeline was
genuinely delayed, not deadlocked.

Each receipt crosses an ~8-hop async pipeline (follower -> ingestion -> collection fetch ->
execution -> receipt pusher -> stub network -> consensus mock), where every hop is an
independently scheduled goroutine handoff. Under full-suite parallel load, the accumulated
scheduling delay for 2 more receipts exceeded the 10s/500ms default bound of
DeliverAllEventually.

Change: both receipt waits in this test now use DeliverAllEventuallyUntil with a 60s
bound and a 100ms poll. Liveness bounds return early on success, so the common case is
unaffected; the faster poll actually speeds the test up to ~2.3s typical (was ~5.5s) by
removing tick-quantization latency.

Validation: 10x full-suite campaign with the fix, 10/10 green. In one run the test took
10.8s, which would have failed under the old 10s bound. All assertions unchanged, no
coverage reduction. Test-only change.

Related: #8634


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Tests
    • Improved asynchronous test reliability by adding bounded waiting and polling for transaction receipt delivery.
    • Tests now allow up to 60 seconds for expected receipts while checking at regular intervals.

@janezpodhostnik
janezpodhostnik requested a review from a team as a code owner August 4, 2026 11:47
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d19ce9b6-5150-4f8f-b47e-d2ee64a67877

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The failed transaction state commitment test now uses explicit 60-second timeouts and 100ms polling intervals for both receipt-delivery waits.

Changes

Execution test wait behavior

Layer / File(s) Summary
Bounded receipt-delivery waits
engine/execution/execution_test.go
Both asynchronous receipt waits use DeliverAllEventuallyUntil with a 60-second timeout and 100ms polling interval.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: alexhentschel, j1010001, kay-zee

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the test-only change and the flaky test it fixes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch janez/fix-flaky-execution-receipt-wait

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@janezpodhostnik janezpodhostnik changed the title Fix flaky TestFailedTxWillNotChangeStateCommitment [Testing] Fix flaky TestFailedTxWillNotChangeStateCommitment Aug 4, 2026
@janezpodhostnik janezpodhostnik self-assigned this Aug 4, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@janezpodhostnik
janezpodhostnik force-pushed the janez/fix-flaky-execution-receipt-wait branch from df287ca to d7a8a76 Compare August 4, 2026 12:00
@janezpodhostnik
janezpodhostnik changed the base branch from master to janez/flaky-test-restore-behavioral-bounds August 4, 2026 12:01
@janezpodhostnik
janezpodhostnik force-pushed the janez/fix-flaky-execution-receipt-wait branch from d7a8a76 to 50f707b Compare August 7, 2026 13:25
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.

4 participants