Skip to content

Commit

Permalink
Make backfill tests more robust (#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns authored Jun 6, 2024
1 parent 486c233 commit 5c171b7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4598,10 +4598,11 @@ func (ts *IntegrationTestSuite) TestScheduleBackfillCreate() {
defer func() {
ts.NoError(handle.Delete(ctx))
}()
time.Sleep(5 * time.Second)
description, err := handle.Describe(ctx)
ts.NoError(err)
ts.EqualValues(60, description.Info.NumActions)
ts.Eventually(func() bool {
description, err := handle.Describe(ctx)
ts.NoError(err)
return description.Info.NumActions == 60
}, 15*time.Second, time.Second)
}

func (ts *IntegrationTestSuite) TestScheduleBackfill() {
Expand Down Expand Up @@ -4644,10 +4645,11 @@ func (ts *IntegrationTestSuite) TestScheduleBackfill() {
},
})
ts.NoError(err)
time.Sleep(5 * time.Second)
description, err = handle.Describe(ctx)
ts.NoError(err)
ts.EqualValues(4, description.Info.NumActions)
ts.Eventually(func() bool {
description, err := handle.Describe(ctx)
ts.NoError(err)
return description.Info.NumActions == 4
}, 5*time.Second, time.Second)
}

func (ts *IntegrationTestSuite) TestScheduleList() {
Expand Down

0 comments on commit 5c171b7

Please sign in to comment.