diff --git a/tests/test_utils.go b/tests/test_utils.go index fc4247eba..3bcd872d6 100644 --- a/tests/test_utils.go +++ b/tests/test_utils.go @@ -12,6 +12,7 @@ import ( "path" "path/filepath" "testing" + "time" "code.gitea.io/gitea/models/db" packages_model "code.gitea.io/gitea/models/packages" @@ -43,6 +44,9 @@ func InitTest(requireGitea bool) { exitf("Environment variable $GITEA_ROOT not set") } + // Speedup tests that rely on the event source ticker. + setting.UI.Notification.EventSourceUpdateTime = time.Second + setting.IsInTesting = true setting.AppWorkPath = giteaRoot setting.CustomPath = filepath.Join(setting.AppWorkPath, "custom")