Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

fix(node/test): lower finalization threshold for TestSyncFinalized#3061

Merged
theochap merged 2 commits intomainfrom
theo/lower-finalization-test-requirements
Nov 24, 2025
Merged

fix(node/test): lower finalization threshold for TestSyncFinalized#3061
theochap merged 2 commits intomainfrom
theo/lower-finalization-test-requirements

Conversation

@theochap
Copy link
Copy Markdown
Member

Description

The finalization test was flaking because we didn't get enough new blocks finalized. This test ensures we are receiving at least one finalized block within 4 mins.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a flaky test by reducing the finalization threshold requirement from at least 2 blocks to at least 1 block within a 4-minute window. This makes the test more reliable while still validating that finalized blocks are being received and synced correctly across nodes.

Key Changes:

  • Updated finalization threshold from 2 to 1 block in the assertion
  • Changed require.Greater to require.GreaterOrEqual to properly check for at least 1 block
  • Updated the comment to reflect the new threshold

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/node/common/sync_ws_test.go Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.8%. Comparing base (55152ee) to head (761f144).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Collaborator

@op-will op-will left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

This reduces the potential number of blocks being checked to a minimum of 1, but it doesn't change the sync requirements of each block, so it should still catch errors.

Comment thread tests/node/common/sync_ws_test.go Outdated
@theochap theochap enabled auto-merge November 24, 2025 20:40
@theochap theochap added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 0dd0d01 Nov 24, 2025
42 of 46 checks passed
@theochap theochap deleted the theo/lower-finalization-test-requirements branch November 24, 2025 21:50
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
…p-rs/kona#3061)

## Description

The finalization test was flaking because we didn't get enough new
blocks finalized. This test ensures we are receiving at least one
finalized block within 4 mins.

---------

Co-authored-by: Copilot <[email protected]>
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
…p-rs/kona#3061)

## Description

The finalization test was flaking because we didn't get enough new
blocks finalized. This test ensures we are receiving at least one
finalized block within 4 mins.

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants