From a8cd949c61b75814207df9efb23197fe09e5710e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 19:01:21 +0000 Subject: [PATCH] test(e2e): fit the ARK Evolved timeouts to a first install The cluster test's waits added up to 59 minutes, over make test-e2e-keep's 50-minute go test timeout, so the cluster-dir wait drops from 45 to 30 minutes. The bot test's 4-minute probe deadline could expire while SteamCMD is still installing, since the server reports Running first. ARK now gives the positive probe 30 minutes. A new optional NegativeDeadline on gameBotSpec keeps its negative control at 4 minutes; it falls back to ProbeDeadline, so no other game test changes. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claude --- ...rksurvival_cluster_persistence_e2e_test.go | 3 ++- test/e2e/arksurvivalevolved_bot_e2e_test.go | 11 ++++++---- test/e2e/gamebot_helpers_e2e_test.go | 22 ++++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/test/e2e/arksurvival_cluster_persistence_e2e_test.go b/test/e2e/arksurvival_cluster_persistence_e2e_test.go index 39e32a7be..0e73278a1 100644 --- a/test/e2e/arksurvival_cluster_persistence_e2e_test.go +++ b/test/e2e/arksurvival_cluster_persistence_e2e_test.go @@ -115,7 +115,8 @@ func TestGameServer_ArkSurvival_ClusterPersistence(t *testing.T) { // the ARK server itself was started against it: hermsi/ark-server passes // -ClusterDirOverride=/cluster and -clusterid once CLUSTER_ID is set. The // server starts only after SteamCMD has installed ~25GB, hence the wait. - envInstance.Eventually(t, 45*time.Minute, func() (bool, string) { + // It stays at 30m so the whole test fits make test-e2e-keep's 50m timeout. + envInstance.Eventually(t, 30*time.Minute, func() (bool, string) { out, err := envInstance.KubectlExec(t, ns, "pod/"+gsName+"-0", "pgrep", "-af", "ShooterGameServer") if err != nil { return false, "ShooterGameServer not running yet: " + err.Error() + " out=" + out diff --git a/test/e2e/arksurvivalevolved_bot_e2e_test.go b/test/e2e/arksurvivalevolved_bot_e2e_test.go index 81236ed92..65e84fae5 100644 --- a/test/e2e/arksurvivalevolved_bot_e2e_test.go +++ b/test/e2e/arksurvivalevolved_bot_e2e_test.go @@ -42,10 +42,13 @@ func TestGameServer_ArkSurvivalEvolvedBot_Query(t *testing.T) { ReqCPU: "2", ReqMem: "8Gi", LimCPU: "4", LimMem: "16Gi", }, - ReadyTimeout: 10 * time.Minute, - ProbePort: 27015, - ProbeDeadline: 4 * time.Minute, - ExpectDepth: joindepth.QUERY, + ReadyTimeout: 10 * time.Minute, + ProbePort: 27015, + // Running comes before SteamCMD finishes the ~25GB install, so the + // positive probe waits for it; the negative control stays short. + ProbeDeadline: 30 * time.Minute, + NegativeDeadline: 4 * time.Minute, + ExpectDepth: joindepth.QUERY, // The operator injects its managed RCON password as ADMIN_PASSWORD, // which hermsi/ark-server writes as ServerAdminPassword. Path A below // proves the agent authenticates with it. diff --git a/test/e2e/gamebot_helpers_e2e_test.go b/test/e2e/gamebot_helpers_e2e_test.go index 31f28c4a3..e18f2aae1 100644 --- a/test/e2e/gamebot_helpers_e2e_test.go +++ b/test/e2e/gamebot_helpers_e2e_test.go @@ -152,13 +152,15 @@ type gameBotSpec struct { ReadyTimeout time.Duration ProbePort int ProbeDeadline time.Duration - ExpectDepth joindepth.JoinDepth - ProbeArgs []string - Probes map[string]any // spec.probes; nil means the operator sets no probe - RCON map[string]any // spec.rcon - ConsoleMode string // spec.consoleMode - Actions []any // spec.capabilities.actions; nil means no actions - Control pathAControl // Path A: drive the server through Gameplane (optional) + // NegativeDeadline bounds the negative-control probe; zero means ProbeDeadline. + NegativeDeadline time.Duration + ExpectDepth joindepth.JoinDepth + ProbeArgs []string + Probes map[string]any // spec.probes; nil means the operator sets no probe + RCON map[string]any // spec.rcon + ConsoleMode string // spec.consoleMode + Actions []any // spec.capabilities.actions; nil means no actions + Control pathAControl // Path A: drive the server through Gameplane (optional) } // runGameBotTest creates the GameTemplate + GameServer, waits for @@ -223,12 +225,16 @@ func runGameBotTest(t *testing.T, s gameBotSpec) { // (the probe pod's own 127.0.0.1) with port 1, which is reserved and never // listens. The probe will immediately get connection refused, proving // transport failure, not a measurement error. + negDeadline := s.NegativeDeadline + if negDeadline == 0 { + negDeadline = s.ProbeDeadline + } negCtrlResult := envInstance.RunGameProbe(t, GameProbe{ GameNS: "default", GSName: "negative-control-" + s.Game, Game: s.Game, Port: 1, - Deadline: s.ProbeDeadline, + Deadline: negDeadline, ExpectDepth: s.ExpectDepth, ExpectFail: true, Args: s.ProbeArgs,