This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push: new 8851a8a11 fix(ci): configurable timeouts 8851a8a11 is described below commit 8851a8a117c821d34048ec1934c654fe4737efd9 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Thu May 16 12:50:27 2024 +0200 fix(ci): configurable timeouts Let the default to be quick enough and provide a higher timeout in those gh action workflows that can be flaky for time reasons --- .github/workflows/builder.yml | 1 + .github/workflows/common.yml | 4 ++++ .github/workflows/native.yml | 2 ++ e2e/support/test_support.go | 29 ++++++++++++++++++----------- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index cbecf7bd1..aeb729e44 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -19,6 +19,7 @@ name: builder env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CAMEL_K_TEST_TIMEOUT_VERY_LONG: 15m on: pull_request: diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 31dacc8f8..bdd2634b4 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -19,6 +19,10 @@ name: common env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CAMEL_K_TEST_TIMEOUT_SHORT: 5m + CAMEL_K_TEST_TIMEOUT_MEDIUM: 20m + CAMEL_K_TEST_TIMEOUT_LONG: 30m + CAMEL_K_TEST_TIMEOUT_VERY_LONG: 60m on: pull_request: diff --git a/.github/workflows/native.yml b/.github/workflows/native.yml index edeb79905..6c50f2ea8 100644 --- a/.github/workflows/native.yml +++ b/.github/workflows/native.yml @@ -19,6 +19,8 @@ name: native env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CAMEL_K_TEST_TIMEOUT_LONG: 30m + CAMEL_K_TEST_TIMEOUT_VERY_LONG: 60m on: pull_request: diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index ac8a6bbe0..16a7d2046 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -130,12 +130,12 @@ const ExpectedOSClusterRoles = 1 var TestDefaultNamespace = "default" -var TestTimeoutShort = 5 * time.Minute -var TestTimeoutMedium = 20 * time.Minute -var TestTimeoutLong = 30 * time.Minute +var TestTimeoutShort = 1 * time.Minute +var TestTimeoutMedium = 3 * time.Minute +var TestTimeoutLong = 5 * time.Minute // TestTimeoutVeryLong should be used only for testing native builds. -var TestTimeoutVeryLong = 60 * time.Minute +var TestTimeoutVeryLong = 15 * time.Minute var NoOlmOperatorImage string @@ -235,22 +235,29 @@ func init() { } } - if imageNoOlm, ok := os.LookupEnv("CAMEL_K_TEST_NO_OLM_OPERATOR_IMAGE"); ok { - if imageNoOlm != "" { - NoOlmOperatorImage = imageNoOlm + if value, ok := os.LookupEnv("CAMEL_K_TEST_TIMEOUT_LONG"); ok { + if duration, err = time.ParseDuration(value); err == nil { + TestTimeoutLong = duration } else { - fmt.Printf("Can't parse CAMEL_K_TEST_NO_OLM_OPERATOR_IMAGE. Using default value from kamel") + fmt.Printf("Can't parse CAMEL_K_TEST_TIMEOUT_LONG. Using default value: %s", TestTimeoutLong) } } - if value, ok := os.LookupEnv("CAMEL_K_TEST_TIMEOUT_LONG"); ok { + if value, ok := os.LookupEnv("CAMEL_K_TEST_TIMEOUT_VERY_LONG"); ok { if duration, err = time.ParseDuration(value); err == nil { - TestTimeoutLong = duration + TestTimeoutVeryLong = duration } else { - fmt.Printf("Can't parse CAMEL_K_TEST_TIMEOUT_LONG. Using default value: %s", TestTimeoutLong) + fmt.Printf("Can't parse CAMEL_K_TEST_TIMEOUT_VERY_LONG. Using default value: %s", TestTimeoutVeryLong) } } + if imageNoOlm, ok := os.LookupEnv("CAMEL_K_TEST_NO_OLM_OPERATOR_IMAGE"); ok { + if imageNoOlm != "" { + NoOlmOperatorImage = imageNoOlm + } else { + fmt.Printf("Can't parse CAMEL_K_TEST_NO_OLM_OPERATOR_IMAGE. Using default value from kamel") + } + } // Gomega settings gomega.SetDefaultEventuallyTimeout(TestTimeoutShort) // Disable object truncation on test results