mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge branch 'master' of github.com:hashicorp/nomad
This commit is contained in:
@@ -68,7 +68,9 @@ func TestJavaDriver_Fingerprint(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJavaDriver_StartOpen_Wait(t *testing.T) {
|
||||
t.Parallel()
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
if !javaLocated() {
|
||||
t.Skip("Java not found; skipping")
|
||||
}
|
||||
@@ -122,7 +124,9 @@ func TestJavaDriver_StartOpen_Wait(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJavaDriver_Start_Wait(t *testing.T) {
|
||||
t.Parallel()
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
if !javaLocated() {
|
||||
t.Skip("Java not found; skipping")
|
||||
}
|
||||
@@ -133,6 +137,7 @@ func TestJavaDriver_Start_Wait(t *testing.T) {
|
||||
Driver: "java",
|
||||
Config: map[string]interface{}{
|
||||
"jar_path": "demoapp.jar",
|
||||
"args": []string{"1"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
@@ -157,15 +162,14 @@ func TestJavaDriver_Start_Wait(t *testing.T) {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
// Task should terminate quickly
|
||||
// Task should terminate after 1 seconds
|
||||
select {
|
||||
case res := <-resp.Handle.WaitCh():
|
||||
if !res.Successful() {
|
||||
t.Fatalf("err: %v", res)
|
||||
t.Fatal("err: %v", res.String())
|
||||
}
|
||||
case <-time.After(time.Duration(testutil.TestMultiplier()*5) * time.Second):
|
||||
// expect the timeout b/c it's a long lived process
|
||||
break
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatalf("timeout")
|
||||
}
|
||||
|
||||
// Get the stdout of the process and assrt that it's not empty
|
||||
@@ -186,7 +190,9 @@ func TestJavaDriver_Start_Wait(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJavaDriver_Start_Kill_Wait(t *testing.T) {
|
||||
t.Parallel()
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
if !javaLocated() {
|
||||
t.Skip("Java not found; skipping")
|
||||
}
|
||||
@@ -246,7 +252,9 @@ func TestJavaDriver_Start_Kill_Wait(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJavaDriver_Signal(t *testing.T) {
|
||||
t.Parallel()
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
if !javaLocated() {
|
||||
t.Skip("Java not found; skipping")
|
||||
}
|
||||
@@ -305,8 +313,10 @@ func TestJavaDriver_Signal(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestJavaDriverUser(t *testing.T) {
|
||||
t.Parallel()
|
||||
func TestJavaDriver_User(t *testing.T) {
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
if !javaLocated() {
|
||||
t.Skip("Java not found; skipping")
|
||||
}
|
||||
@@ -348,7 +358,9 @@ func TestJavaDriverUser(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestJavaDriver_Start_Wait_Class(t *testing.T) {
|
||||
t.Parallel()
|
||||
if !testutil.IsTravis() {
|
||||
t.Parallel()
|
||||
}
|
||||
if !javaLocated() {
|
||||
t.Skip("Java not found; skipping")
|
||||
}
|
||||
@@ -360,6 +372,7 @@ func TestJavaDriver_Start_Wait_Class(t *testing.T) {
|
||||
Config: map[string]interface{}{
|
||||
"class_path": "${NOMAD_TASK_DIR}",
|
||||
"class": "Hello",
|
||||
"args": []string{"1"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
@@ -384,15 +397,14 @@ func TestJavaDriver_Start_Wait_Class(t *testing.T) {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
// Task should terminate quickly
|
||||
// Task should terminate after 1 seconds
|
||||
select {
|
||||
case res := <-resp.Handle.WaitCh():
|
||||
if !res.Successful() {
|
||||
t.Fatalf("err: %v", res)
|
||||
t.Fatal("err: %v", res.String())
|
||||
}
|
||||
case <-time.After(time.Duration(testutil.TestMultiplier()*5) * time.Second):
|
||||
// expect the timeout b/c it's a long lived process
|
||||
break
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatalf("timeout")
|
||||
}
|
||||
|
||||
// Get the stdout of the process and assrt that it's not empty
|
||||
|
||||
Reference in New Issue
Block a user