Skip to content

Commit

Permalink
Fix TestHeadTracker_CallsHeadTrackableCallbacks flaky test (#13712)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaidashenko committed Jul 8, 2024
1 parent 8537fe0 commit 535d279
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-seas-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Fix TestHeadTracker_CallsHeadTrackableCallbacks flaky test #internal
3 changes: 1 addition & 2 deletions core/chains/evm/headtracker/head_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ func TestHeadTracker_Start(t *testing.T) {

func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) {
t.Parallel()
g := gomega.NewWithT(t)

db := pgtest.NewSqlxDB(t)
config := testutils.NewTestChainScopedConfig(t, nil)
Expand Down Expand Up @@ -360,7 +359,7 @@ func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) {

headers := <-chchHeaders
headers.TrySend(&evmtypes.Head{Number: 1, Hash: utils.NewHash(), EVMChainID: ubig.New(testutils.FixtureChainID)})
g.Eventually(checker.OnNewLongestChainCount).Should(gomega.Equal(int32(1)))
tests.AssertEventually(t, func() bool { return checker.OnNewLongestChainCount() == 1 })

ht.Stop(t)
assert.Equal(t, int32(1), checker.OnNewLongestChainCount())
Expand Down

0 comments on commit 535d279

Please sign in to comment.