Skip to content

Commit d33a15d

Browse files
refactor(e2e): optimize test timing
- Reduce curl pod sleep from 3600s to 300s - Remove unnecessary time.Sleep after operator restart Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7bee8c9 commit d33a15d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

test/e2e/framework/mock_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (c *MockServerClient) ensureCurlPod(ctx context.Context, namespace string)
8686
"--image-pull-policy=IfNotPresent",
8787
"--command",
8888
"--",
89-
"sleep", "3600",
89+
"sleep", "300",
9090
}
9191
cmd := exec.CommandContext(ctx, "kubectl", args...)
9292
var stdout, stderr bytes.Buffer

test/e2e/pod_lifecycle_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ func TestPodLifecycle_OperatorCrashRecovery(t *testing.T) {
303303
componentName := ctx.Value(podLifecycleComponentKey).(string)
304304
exposerName := ctx.Value(podLifecycleExposerKey).(string)
305305

306-
time.Sleep(5 * time.Second)
307-
308306
if err := framework.WaitForScalityUIReady(ctx, client, scalityUIName, framework.DefaultTimeout); err != nil {
309307
t.Fatalf("ScalityUI not ready after recovery: %v", err)
310308
}

0 commit comments

Comments
 (0)