mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 05:36:16 +00:00
bug: require.Eventually must not test with assert
Otherwise it fails the test instead of retrying if the condition fails at least once.
This commit is contained in:
parent
30f795d925
commit
2541a943ce
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue