1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 13:09:23 -05:00

fix(tests): 30s to cancel processes to avoid false negatives

on slower machines it can take more than 1 second to cancel leftover
tasks

(cherry picked from commit 6316e21be2)
This commit is contained in:
Earl Warren 2024-04-18 18:45:40 +02:00
parent 8f06a99c2c
commit 2f54b76c5c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -236,7 +236,7 @@ func PrepareTestEnv(t testing.TB, skip ...int) func() {
// kill all background processes to prevent them from interfering with the fixture loading
// see https://codeberg.org/forgejo/forgejo/issues/2962
cancelProcesses(t, time.Second)
cancelProcesses(t, 30*time.Second)
t.Cleanup(func() { cancelProcesses(t, 0) }) // cancel remaining processes in a non-blocking way
// load database fixtures