aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-06-02 02:39:44 +0100
committerGitHub <noreply@github.com>2020-06-01 21:39:44 -0400
commit14ca111f33eebb2c8394a225f9ed9cc712f3bcae (patch)
treec22f6b4edfd469271b45b715924a60683bd83ad1 /integrations/integration_test.go
parentdc812f8ba5bf1c123fa948afed15c4309da8fb45 (diff)
downloadgitea-14ca111f33eebb2c8394a225f9ed9cc712f3bcae.tar.gz
gitea-14ca111f33eebb2c8394a225f9ed9cc712f3bcae.zip
log slow tests (#11487)
* log slow tests Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * More lint placation Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index 3c0125af6c..0d49e524d5 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -22,6 +22,7 @@ import (
"runtime"
"strings"
"testing"
+ "time"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
@@ -66,6 +67,27 @@ func TestMain(m *testing.M) {
mac = routes.NewMacaron()
routes.RegisterRoutes(mac)
+ // integration test settings...
+ if setting.Cfg != nil {
+ testingCfg := setting.Cfg.Section("integration-tests")
+ slowTest = testingCfg.Key("SLOW_TEST").MustDuration(slowTest)
+ slowFlush = testingCfg.Key("SLOW_FLUSH").MustDuration(slowFlush)
+ }
+
+ if os.Getenv("GITEA_SLOW_TEST_TIME") != "" {
+ duration, err := time.ParseDuration(os.Getenv("GITEA_SLOW_TEST_TIME"))
+ if err == nil {
+ slowTest = duration
+ }
+ }
+
+ if os.Getenv("GITEA_SLOW_FLUSH_TIME") != "" {
+ duration, err := time.ParseDuration(os.Getenv("GITEA_SLOW_FLUSH_TIME"))
+ if err == nil {
+ slowFlush = duration
+ }
+ }
+
var helper testfixtures.Helper
if setting.Database.UseMySQL {
helper = &testfixtures.MySQL{}