e2e: java driver isolation tests

This commit is contained in:
Chris Baker
2021-01-27 14:44:07 +00:00
parent 3eb9cdf740
commit c9905747e6
4 changed files with 164 additions and 1 deletions

View File

@@ -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 = <<EOH
public class Sleep {
public static void main(String... s) throws Exception {
Thread.sleep(30000);
}
}
EOH
}
}
task "sleep" {
driver = "java"
config {
class_path = "${NOMAD_ALLOC_DIR}"
class = "Sleep"
}
}
}
}