From 2541a943ce01636203e8e456e0a2308b24c4ba4a Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 9 Nov 2024 00:07:18 +0100 Subject: [PATCH] bug: require.Eventually must not test with assert Otherwise it fails the test instead of retrying if the condition fails at least once. --- tests/integration/actions_trigger_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/actions_trigger_test.go b/tests/integration/actions_trigger_test.go index 25dcacde34..9cf2d4305f 100644 --- a/tests/integration/actions_trigger_test.go +++ b/tests/integration/actions_trigger_test.go @@ -321,7 +321,7 @@ jobs: require.Eventually(t, func() bool { actionRuns = make([]*actions_model.ActionRun, 0) require.NoError(t, db.GetEngine(db.DefaultContext).Where("repo_id=?", baseRepo.ID).Find(&actionRuns)) - return assert.Len(t, actionRuns, count) + return len(actionRuns) == count }, 30*time.Second, 1*time.Second) // verify the expected ActionRuns were created