From b4a7491859e50c3cf3b89f67f381d2c8a6f4297f Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Wed, 5 Jun 2024 16:46:34 -0700 Subject: [PATCH] Make backfill tests more robust --- test/integration_test.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/integration_test.go b/test/integration_test.go index bbdbdb423..439953910 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -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() { @@ -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() {