Skip to content

Fix flakes#1043

Open
RensR wants to merge 1 commit into
mainfrom
fix-test-flakes
Open

Fix flakes#1043
RensR wants to merge 1 commit into
mainfrom
fix-test-flakes

Conversation

@RensR
Copy link
Copy Markdown
Collaborator

@RensR RensR commented Apr 23, 2026

Replace arbitrary 300ms sleep with polling.

@github-actions
Copy link
Copy Markdown

Code coverage report:

Package main fix-test-flakes diff
github.com/smartcontractkit/chainlink-ccv/aggregator 48.45% 48.46% +0.01%
github.com/smartcontractkit/chainlink-ccv/bootstrap 42.60% 42.60% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 50.74% 50.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.97% 45.97% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 37.68% 37.77% +0.09%
github.com/smartcontractkit/chainlink-ccv/integration 46.93% 46.82% -0.11%
github.com/smartcontractkit/chainlink-ccv/pkg 84.62% 84.62% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 65.19% 65.19% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 32.73% 32.73% +0.00%

@RensR RensR marked this pull request as ready for review April 24, 2026 09:10
@RensR RensR requested a review from a team as a code owner April 24, 2026 09:10
Copilot AI review requested due to automatic review settings April 24, 2026 09:10
@RensR RensR enabled auto-merge April 24, 2026 09:10
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 addresses test flakiness in the SourceReader service tests by replacing fixed sleeps with polling-based assertions, making the tests more robust across -race, -short, and slower CI environments.

Changes:

  • Replaced a hard-coded time.Sleep(300ms) with require.Eventually in two event-monitoring-loop panic recovery tests.
  • Simplified assertions by relying on the polling condition to enforce the minimum number of loop iterations observed.

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

@RensR RensR force-pushed the fix-test-flakes branch from 67abaa7 to e630460 Compare May 13, 2026 11:58
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.

3 participants