Fixes GemFire client/server integratione tests issue when setting JAVA_TOOL_OPTIONS env var

Fixes gh-727
This commit is contained in:
John Blum
2017-01-18 00:42:41 +01:00
committed by Vedran Pavic
parent ecf0a80d7d
commit 736b341ba3
10 changed files with 268 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
apply from: JAVA_GRADLE
apply from: SAMPLE_GRADLE
apply from: TOMCAT_7_GRADLE
apply plugin: "application"
apply from: SAMPLE_GRADLE
dependencies {
compile project(':spring-session-data-gemfire'),
@@ -37,7 +37,10 @@ task availablePort() {
task runGemFireServer(dependsOn: availablePort) {
doLast {
println 'STARTING GEMFIRE SERVER...'
println "Starting GemFire Server on port [$port]..."
def out = new StringBuilder()
def err = new StringBuilder()
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
@@ -50,14 +53,16 @@ task runGemFireServer(dependsOn: availablePort) {
//println commandLine
process = commandLine.execute()
process.in.close()
process.out.close()
process.err.close()
process.consumeProcessOutput(out, err)
//println 'OUT: ' + out
//println 'ERR: ' + err
}
}
integrationTest.doLast {
println 'STOPPING GEMFIRE SERVER...'
println 'Stopping GemFire Server...'
process?.destroyForcibly()
}

View File

@@ -27,8 +27,7 @@ import org.springframework.context.annotation.ImportResource;
public class Application {
public static void main(final String[] args) {
new AnnotationConfigApplicationContext(Application.class)
.registerShutdownHook();
new AnnotationConfigApplicationContext(Application.class).registerShutdownHook();
}
}
// tag::end[]