Skip to content

Commit bfc72f4

Browse files
aareetclaude
andcommitted
fix: flaky Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog
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>
1 parent 749ce31 commit bfc72f4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

core/services/keeper/registry1_3_synchronizer_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,16 @@ func Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog(t *testing.T) {
707707
cltest.WaitForCount(t, db, "keeper_registries", 1)
708708
cltest.WaitForCount(t, db, "upkeep_registrations", 1)
709709

710+
// Verify initial check data before proceeding to ensure fullSync is complete
711+
g.Eventually(func() []byte {
712+
var upkeep keeper.UpkeepRegistration
713+
err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations WHERE upkeep_id = $1`, sqlutil.New(upkeepId))
714+
require.NoError(t, err)
715+
return upkeep.CheckData
716+
}, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(upkeepConfig1_3.CheckData))
717+
710718
head := cltest.MustInsertHead(t, db, 1)
711719
rawLog := types.Log{BlockHash: head.Hash}
712-
_ = logmocks.NewBroadcast(t)
713720
newCheckData := []byte("Chainlink")
714721
registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress)
715722
newConfig := upkeepConfig1_3

0 commit comments

Comments
 (0)