Merge pull request '[v9.0/forgejo] bug: require.Eventually must not test with assert' (#5870) from bp-v9.0/forgejo-2541a94 into v9.0/forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5870
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-11-09 00:39:12 +00:00
commit 9a7b0c3f02

View file

@ -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