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

Fixes gh-669
This commit is contained in:
John Blum
2017-01-17 15:42:41 -08:00
parent 0e10b7763c
commit 3e24393e9a
13 changed files with 256 additions and 54 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)
String gemfireLogLevel = System.getProperty('sample.httpsession.gemfire.log-level', 'warning')
@@ -52,14 +55,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[]