Skip to content

[CRE-3674] fix: flaky Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog#22126

Open
aareet wants to merge 1 commit intodevelopfrom
fix/flaky-TestSyncer-UpkeepCheckDataUpdatedLog
Open

[CRE-3674] fix: flaky Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog#22126
aareet wants to merge 1 commit intodevelopfrom
fix/flaky-TestSyncer-UpkeepCheckDataUpdatedLog

Conversation

@aareet
Copy link
Copy Markdown
Contributor

@aareet aareet commented Apr 22, 2026

Summary

  • Add initial check data verification (g.Eventually) before the log handling phase to ensure fullSync has fully completed and the run loop is in the select statement — matches the pattern used in the stable UpkeepGasLimitSetLog test
  • Remove unused logmocks.NewBroadcast(t) (dead code)

Fixes: CRE-3674

Root cause

WaitForCount succeeds as soon as UpsertUpkeep commits, but fullSync may still be running (goroutines in batchSyncUpkeepsOnRegistry haven't finished). Under CI load, this delays when the run loop enters select and picks up the log notification from HandleLog, causing the test to hang or fail.

Test plan

  • go test -race -count=5 -run Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog — 5/5 passes
  • Full keeper package test suite passes with race detector

🤖 Generated with Claude Code

Add initial check data verification before proceeding to the log
handling phase, matching the pattern used in the stable
UpkeepGasLimitSetLog test. This ensures fullSync has fully completed
and the run loop is in the select statement before the test sets up
new mocks and calls HandleLog. Also remove unused broadcast mock.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aareet aareet force-pushed the fix/flaky-TestSyncer-UpkeepCheckDataUpdatedLog branch from 16346e4 to bfc72f4 Compare April 22, 2026 04:06
@github-actions
Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@aareet aareet changed the title fix: flaky Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog [CRE-3674] fix: flaky Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog Apr 22, 2026
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 22, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link
Copy Markdown

@aareet aareet marked this pull request as ready for review April 22, 2026 14:33
@aareet aareet requested a review from a team as a code owner April 22, 2026 14:33
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.

2 participants