Actually append jvm opts to the CLI

- Also adds a test
This commit is contained in:
Abhishek Chanda
2015-10-16 22:34:50 +00:00
parent 356ddfeaa6
commit 1a3f79c755
2 changed files with 2 additions and 0 deletions

View File

@@ -138,6 +138,7 @@ func (d *JavaDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
jvm_options, ok := task.Config["jvm_options"]
if ok && jvm_options != "" {
d.logger.Printf("[DEBUG] driver.java: found JVM options: %s", jvm_options)
args = append(args, jvm_options)
}
// Build the argument list

View File

@@ -100,6 +100,7 @@ func TestJavaDriver_Start_Wait(t *testing.T) {
"jar_source": "https://dl.dropboxusercontent.com/u/47675/jar_thing/demoapp.jar",
// "jar_source": "https://s3-us-west-2.amazonaws.com/java-jar-thing/demoapp.jar",
// "args": "-d64",
"jvm_options": "-Xmx2048m -Xms256m",
},
Resources: basicResources,
}