From c9905747e6669ca16e2f13a126cb0686d9ff9944 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Wed, 27 Jan 2021 14:44:07 +0000 Subject: [PATCH] e2e: java driver isolation tests --- e2e/isolation/input/alloc_exec.nomad | 2 +- e2e/isolation/input/alloc_exec_java.nomad | 39 +++++++++++ e2e/isolation/input/java.nomad | 39 +++++++++++ e2e/isolation/isolation.go | 85 +++++++++++++++++++++++ 4 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 e2e/isolation/input/alloc_exec_java.nomad create mode 100644 e2e/isolation/input/java.nomad diff --git a/e2e/isolation/input/alloc_exec.nomad b/e2e/isolation/input/alloc_exec.nomad index 4c36d4af6..2135d05eb 100644 --- a/e2e/isolation/input/alloc_exec.nomad +++ b/e2e/isolation/input/alloc_exec.nomad @@ -13,7 +13,7 @@ job "alloc_exec" { config { command = "/bin/sleep" - args = ["30s"] + args = ["30s"] } resources { diff --git a/e2e/isolation/input/alloc_exec_java.nomad b/e2e/isolation/input/alloc_exec_java.nomad new file mode 100644 index 000000000..7f284079b --- /dev/null +++ b/e2e/isolation/input/alloc_exec_java.nomad @@ -0,0 +1,39 @@ +job "java_sleep" { + datacenters = ["dc1"] + type = "batch" + + group "java" { + + task "build" { + lifecycle { + hook = "prestart" + sidecar = false + } + + driver = "exec" + config { + command = "javac" + args = ["-d", "${NOMAD_ALLOC_DIR}", "local/Sleep.java"] + } + + template { + destination = "local/Sleep.java" + data = <