0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 23:33:15 -05:00

Merge pull request 'bug: require.Eventually must not test with assert' (#5869) from earl-warren/forgejo:wip-race-test into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5869
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
Earl Warren 2024-11-08 23:41:27 +00:00
commit 9a15b2be43

View file

@ -321,7 +321,7 @@ jobs:
require.Eventually(t, func() bool { require.Eventually(t, func() bool {
actionRuns = make([]*actions_model.ActionRun, 0) actionRuns = make([]*actions_model.ActionRun, 0)
require.NoError(t, db.GetEngine(db.DefaultContext).Where("repo_id=?", baseRepo.ID).Find(&actionRuns)) 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) }, 30*time.Second, 1*time.Second)
// verify the expected ActionRuns were created // verify the expected ActionRuns were created