From bfb2263f3022e6a94772c5ac0fd8fe7df70173fc Mon Sep 17 00:00:00 2001 From: Daniel Bennett Date: Fri, 1 Dec 2023 14:03:40 -0600 Subject: [PATCH] e2e: give isolation test jobs more time to start (#19276) --- e2e/isolation/pids_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/e2e/isolation/pids_test.go b/e2e/isolation/pids_test.go index 088e4da6e..036207654 100644 --- a/e2e/isolation/pids_test.go +++ b/e2e/isolation/pids_test.go @@ -7,6 +7,7 @@ import ( "regexp" "strings" "testing" + "time" "github.com/hashicorp/nomad/e2e/v3/cluster3" "github.com/hashicorp/nomad/e2e/v3/jobs3" @@ -62,7 +63,10 @@ func testExecHostPID(t *testing.T) { } func testExecNamespaceAllocExec(t *testing.T) { - job, cleanup := jobs3.Submit(t, "./input/alloc_exec.hcl") + job, cleanup := jobs3.Submit(t, + "./input/alloc_exec.hcl", + jobs3.Timeout(time.Second*30), // exec can be a bit slow + ) t.Cleanup(cleanup) logs := job.Exec("group", "sleep", []string{"ps", "ax"}) @@ -76,6 +80,7 @@ func testJavaNamespacePID(t *testing.T) { job, cleanup := jobs3.Submit(t, "./input/java.hcl", jobs3.WaitComplete("group"), + jobs3.Timeout(time.Second*30), // exec prestart can be slow ) t.Cleanup(cleanup) @@ -87,6 +92,7 @@ func testJavaHostPID(t *testing.T) { job, cleanup := jobs3.Submit(t, "./input/java_host.hcl", jobs3.WaitComplete("group"), + jobs3.Timeout(time.Second*30), // exec prestart can be slow ) t.Cleanup(cleanup) @@ -97,7 +103,10 @@ func testJavaHostPID(t *testing.T) { } func testJavaNamespaceAllocExec(t *testing.T) { - job, cleanup := jobs3.Submit(t, "./input/alloc_exec_java.hcl") + job, cleanup := jobs3.Submit(t, + "./input/alloc_exec_java.hcl", + jobs3.Timeout(time.Second*30), // exec prestart can be slow + ) t.Cleanup(cleanup) logs := job.Exec("group", "sleep", []string{"ps", "ax"})