mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
e2e: give isolation test jobs more time to start (#19276)
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/hashicorp/nomad/e2e/v3/cluster3"
|
"github.com/hashicorp/nomad/e2e/v3/cluster3"
|
||||||
"github.com/hashicorp/nomad/e2e/v3/jobs3"
|
"github.com/hashicorp/nomad/e2e/v3/jobs3"
|
||||||
@@ -62,7 +63,10 @@ func testExecHostPID(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testExecNamespaceAllocExec(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)
|
t.Cleanup(cleanup)
|
||||||
|
|
||||||
logs := job.Exec("group", "sleep", []string{"ps", "ax"})
|
logs := job.Exec("group", "sleep", []string{"ps", "ax"})
|
||||||
@@ -76,6 +80,7 @@ func testJavaNamespacePID(t *testing.T) {
|
|||||||
job, cleanup := jobs3.Submit(t,
|
job, cleanup := jobs3.Submit(t,
|
||||||
"./input/java.hcl",
|
"./input/java.hcl",
|
||||||
jobs3.WaitComplete("group"),
|
jobs3.WaitComplete("group"),
|
||||||
|
jobs3.Timeout(time.Second*30), // exec prestart can be slow
|
||||||
)
|
)
|
||||||
t.Cleanup(cleanup)
|
t.Cleanup(cleanup)
|
||||||
|
|
||||||
@@ -87,6 +92,7 @@ func testJavaHostPID(t *testing.T) {
|
|||||||
job, cleanup := jobs3.Submit(t,
|
job, cleanup := jobs3.Submit(t,
|
||||||
"./input/java_host.hcl",
|
"./input/java_host.hcl",
|
||||||
jobs3.WaitComplete("group"),
|
jobs3.WaitComplete("group"),
|
||||||
|
jobs3.Timeout(time.Second*30), // exec prestart can be slow
|
||||||
)
|
)
|
||||||
t.Cleanup(cleanup)
|
t.Cleanup(cleanup)
|
||||||
|
|
||||||
@@ -97,7 +103,10 @@ func testJavaHostPID(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testJavaNamespaceAllocExec(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)
|
t.Cleanup(cleanup)
|
||||||
|
|
||||||
logs := job.Exec("group", "sleep", []string{"ps", "ax"})
|
logs := job.Exec("group", "sleep", []string{"ps", "ax"})
|
||||||
|
|||||||
Reference in New Issue
Block a user