Skip to content

Commit a68ea56

Browse files
authored
acc: Multiply timeouts by 2 on CI (#3127)
## Why Experiencing many timeouts recently. If it's due to CI machines being slower, this could help. Maybe.
1 parent eda0400 commit a68ea56

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

acceptance/acceptance_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ const (
8080
EnvFilterVar = "ENVFILTER"
8181
)
8282

83+
// On CI, we want to increase timeout, to account for slower environment
84+
const CITimeoutMultiplier = 2
85+
86+
var ApplyCITimeoutMultipler = os.Getenv("GITHUB_WORKFLOW") != ""
87+
8388
var exeSuffix = func() string {
8489
if runtime.GOOS == "windows" {
8590
return ".exe"
@@ -464,6 +469,11 @@ func runTest(t *testing.T,
464469
} else if isRunningOnCloud {
465470
timeout = max(timeout, config.TimeoutCloud)
466471
}
472+
473+
if ApplyCITimeoutMultipler {
474+
timeout *= CITimeoutMultiplier
475+
}
476+
467477
ctx, cancelFunc := context.WithTimeout(context.Background(), timeout)
468478
defer cancelFunc()
469479
args := []string{"bash", "-euo", "pipefail", EntryPointScript}

0 commit comments

Comments
 (0)