Add 'test' and 'integrationTest' closures to configure the test JVM Heap memory sizes using Gradle Project Properties.

Additionally, add JVM System Property and Gradle Project Property support to configure the Apache Geode Logback Logger log-level.
This commit is contained in:
John Blum
2020-02-13 18:41:29 -08:00
parent 02e0e57896
commit fdce454f05

View File

@@ -38,3 +38,33 @@ dependencies {
integrationTestRuntime "org.springframework.shell:spring-shell"
}
test {
maxHeapSize = project.hasProperty("test.jvm.heap.max-size")
? project.getProperty("test.jvm.heap.max-size")
: "512m"
minHeapSize = project.hasProperty("test.jvm.heap.min-size")
? project.getProperty("test.jvm.heap.min-size")
: "512m"
}
integrationTest {
maxHeapSize = project.hasProperty("test.jvm.heap.max-size")
? project.getProperty("test.jvm.heap.max-size")
: "2g"
minHeapSize = project.hasProperty("test.jvm.heap.min-size")
? project.getProperty("test.jvm.heap.min-size")
: "512m"
def gradleProjectPropertyLogbackLogLevel = project.hasProperty("logback.log.level")
? project.getProperty("logback.log.level")
: "ERROR";
systemProperty "logback.log.level", System.getProperty("logback.log.level", gradleProjectPropertyLogbackLogLevel)
}