mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 16:03:20 +02:00
Refactor some tests (#34580)
1. use `test.MockVariableValue` as much as possible 2. avoid `time.Sleep` as much as possible
This commit is contained in:
1 parent
c5e78fc7ad
commit
2a1585b32e
23 files changed
+58
-148
No files matched your search
@@ -39,8 +39,6 @@ func TestPushMirrorsIterate(t *testing.T) {
|
||||
Interval: 0,
|
||||
})
|
||||
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
|
||||
repo_model.PushMirrorsIterate(db.DefaultContext, 1, func(idx int, bean any) error {
|
||||
m, ok := bean.(*repo_model.PushMirror)
|
||||
assert.True(t, ok)
|
||||
|
||||
Reference in new issue
Block a user