Skip to content

Commit

Permalink
test: partial revert
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Dec 20, 2024
1 parent 28d2549 commit b88338d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions core/internal/cltest/cltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ func WaitForPipeline(t testing.TB, nodeID int, jobID int32, expectedPipelineRuns
t.Helper()

var pr []pipeline.Run
if !gomega.NewWithT(t).Eventually(func() bool {
gomega.NewWithT(t).Eventually(func() bool {
prs, _, err := jo.PipelineRuns(testutils.Context(t), &jobID, 0, 1000)
require.NoError(t, err)

Expand Down Expand Up @@ -1029,9 +1029,7 @@ func WaitForPipeline(t testing.TB, nodeID int, jobID int32, expectedPipelineRuns
jobID,
len(pr),
),
) {
t.Fatal()
}
)
return pr
}

Expand Down
6 changes: 2 additions & 4 deletions core/internal/features/ocr2/features_ocr2_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,11 @@ updateInterval = "1m"

// Trail #1: 4 oracles reporting 0, 10, 20, 30. Answer should be 20 (results[4/2]).
// Trial #2: 4 oracles reporting 0, 20, 40, 60. Answer should be 40 (results[4/2]).
if !gomega.NewGomegaWithT(t).Eventually(func() string {
gomega.NewGomegaWithT(t).Eventually(func() string {
answer, err2 := ocrContract.LatestAnswer(nil)
require.NoError(t, err2)
return answer.String()
}, tests.WaitTimeout(t), 200*time.Millisecond).Should(gomega.Equal(strconv.Itoa(2 * retVal))) {
t.Fatal()
}
}, tests.WaitTimeout(t), 200*time.Millisecond).Should(gomega.Equal(strconv.Itoa(2 * retVal)))

for _, app := range apps {
jobs, _, err2 := app.JobORM().FindJobs(ctx, 0, 1000)
Expand Down
6 changes: 2 additions & 4 deletions core/internal/features/ocr2/features_ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,11 @@ updateInterval = "1m"
wg.Wait()

// 4 oracles reporting 0, 10, 20, 30. Answer should be 20 (results[4/2]).
if !gomega.NewGomegaWithT(t).Eventually(func() string {
gomega.NewGomegaWithT(t).Eventually(func() string {
answer, err := ocrContract.LatestAnswer(nil)
require.NoError(t, err)
return answer.String()
}, tests.WaitTimeout(t), 200*time.Millisecond).Should(gomega.Equal("20")) {
t.Fatal()
}
}, tests.WaitTimeout(t), 200*time.Millisecond).Should(gomega.Equal("20"))

for _, app := range apps {
jobs, _, err := app.JobORM().FindJobs(ctx, 0, 1000)
Expand Down

0 comments on commit b88338d

Please sign in to comment.