Merge pull request 'fix(tests): 30s to cancel processes to avoid false negatives' (#3317) from earl-warren/forgejo:wip-cancel-test into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3317
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
Earl Warren 2024-04-19 12:48:41 +00:00
commit b05a7809b5

View file

@ -224,7 +224,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