From 06e5d6c18a51582ed4f2e30efb5aa31d4f488cde Mon Sep 17 00:00:00 2001 From: Ciaran Roche Date: Wed, 3 Jun 2026 09:20:44 +0100 Subject: [PATCH] HYPERFLEET-1170: default Ginkgo suite timeout to 2h GinkgoConfiguration() returns Ginkgo's own 1h default (never 0), so the post-hoc `if suiteConfig.Timeout == 0 { 2h }` guard never fired and the suite always ran at the 1h default. This surfaced when the rc-e2e job (combined tier0+tier1, ~60 min) hit the cap. Set the 2h default before the viper override so SUITE_TIMEOUT still wins when set. Co-Authored-By: Claude Opus 4.8 (1M context) --- pkg/e2e/e2e.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/e2e/e2e.go b/pkg/e2e/e2e.go index c61e693..46d7541 100644 --- a/pkg/e2e/e2e.go +++ b/pkg/e2e/e2e.go @@ -32,12 +32,14 @@ func RunTests(ctx context.Context) int { // Configure Ginkgo from viper suiteConfig, reporterConfig := ginkgo.GinkgoConfiguration() - configureGinkgoFromViper(&suiteConfig, &reporterConfig) - // Set default timeout if not configured - if suiteConfig.Timeout == 0 { - suiteConfig.Timeout = 2 * time.Hour - } + // Default the suite timeout to 2h. GinkgoConfiguration() returns Ginkgo's + // own 1h default (never 0), so a post-hoc `if Timeout == 0` guard never + // fired. Set the default here, before the viper override so SUITE_TIMEOUT + // still wins when set. + suiteConfig.Timeout = 2 * time.Hour + + configureGinkgoFromViper(&suiteConfig, &reporterConfig) // Run the test suite using Ginkgo's native GinkgoT // This avoids testing.Main and its os.Exit call