Skip to content

Commit

Permalink
use defer in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Mar 21, 2024
1 parent 61c0109 commit 875efb1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/services/ocr2/plugins/ocr2keeper/integration_21_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,8 @@ func TestIntegration_KeeperPluginLogUpkeep_Retry(t *testing.T) {
}()

listener, done := listenPerformed(t, backend, registry, feeds.UpkeepsIds(), int64(1))
defer done()
g.Eventually(listener, testutils.WaitTimeout(t)-(5*time.Second), cltest.DBPollingInterval).Should(gomega.BeTrue())

done()
}

func TestIntegration_KeeperPluginLogUpkeep_ErrHandler(t *testing.T) {
Expand Down Expand Up @@ -475,8 +474,8 @@ func TestIntegration_KeeperPluginLogUpkeep_ErrHandler(t *testing.T) {
}

listener, done := listenPerformed(t, backend, registry, idsToCheck, startBlock)
defer done()
g.Eventually(listener, testutils.WaitTimeout(t)-(5*time.Second), cltest.DBPollingInterval).Should(gomega.BeTrue())
done()
}

func startMercuryServer(t *testing.T, mercuryServer *mercury.SimulatedMercuryServer, responder func(i int) (int, []byte)) {
Expand Down

0 comments on commit 875efb1

Please sign in to comment.