mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-09 19:29:26 +00:00
Define the timeout to 24h for Ginkgo V2
Default timeout setting has been reduced from `24h` down to `1h` in Ginkgo V2, but for some long running test this is too short. How long to abort the test was controlled by the the linux command `timeout` in V1. e.g. `'timeout -k 30s 150m ...`, and is configured in the file like `sig-network-misc.yaml`. Set the timeout manually for Ginkgo V2 to avoid the early aborting. Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
@@ -72,6 +72,20 @@ func getCmd(env Getenver, w io.Writer) *exec.Cmd {
|
||||
if len(env.Getenv(dryRunEnvKey)) > 0 {
|
||||
ginkgoArgs = append(ginkgoArgs, "--dryRun=true")
|
||||
}
|
||||
// NOTE: Ginkgo's default timeout has been reduced from 24h to 1h in V2, set it as "24h" for backward compatibility
|
||||
// if this is not set by env of extraGinkgoArgsEnvKey.
|
||||
exists := func(args []string) bool {
|
||||
for _, arg := range args {
|
||||
if strings.Contains(arg, "--timeout") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}(ginkgoArgs)
|
||||
|
||||
if !exists {
|
||||
ginkgoArgs = append(ginkgoArgs, "--timeout=24h")
|
||||
}
|
||||
|
||||
args := []string{}
|
||||
args = append(args, ginkgoArgs...)
|
||||
|
||||
Reference in New Issue
Block a user