Change some common settings for smoke-tests
log server output to files. Fix server dependencies. Only run smoke tests on standard JVMs.
This commit is contained in:
parent
6089dc60ba
commit
bfd653549f
|
@ -1,9 +1 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
integrationTests = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
|
||||
description = 'dd-smoke-tests'
|
||||
|
|
|
@ -84,6 +84,7 @@ def randomOpenPort() {
|
|||
}
|
||||
|
||||
task startServer(type: com.github.psxpaul.task.ExecFork) {
|
||||
dependsOn project(':dd-java-agent').shadowJar
|
||||
playHttpPort = randomOpenPort()
|
||||
|
||||
if (playHttpPort == -1) {
|
||||
|
@ -93,6 +94,7 @@ task startServer(type: com.github.psxpaul.task.ExecFork) {
|
|||
workingDir = "${buildDir}/stage/playBinary"
|
||||
commandLine = "${workingDir}/bin/playBinary"
|
||||
stopAfter = test
|
||||
standardOutput "${buildDir}/reports/server.log"
|
||||
// these params tells the ExecFork plugin to block on startServer task until the port is opened or the string is seen in the ouput
|
||||
waitForPort = playHttpPort
|
||||
waitForOutput = "Listening for HTTP on /127.0.0.1:${playHttpPort}"
|
||||
|
@ -120,7 +122,7 @@ tasks.withType(Test) {
|
|||
events "started"
|
||||
}
|
||||
|
||||
dependsOn project(':dd-java-agent').shadowJar, startServer
|
||||
dependsOn startServer
|
||||
}
|
||||
|
||||
// clean up the PID file from the server
|
||||
|
|
|
@ -67,6 +67,8 @@ task unzip(type: Copy) {
|
|||
}
|
||||
|
||||
task startServer(type: com.github.psxpaul.task.ExecFork) {
|
||||
dependsOn project(':dd-java-agent').shadowJar
|
||||
|
||||
wildflyHttpPort = randomOpenPort()
|
||||
// not used, but to ensure https default port 8443 won't clash
|
||||
int httpsPort = randomOpenPort()
|
||||
|
@ -80,6 +82,7 @@ task startServer(type: com.github.psxpaul.task.ExecFork) {
|
|||
commandLine = "${workingDir}/bin/standalone.sh"
|
||||
// ideally this should be good enough to use to stop wildfly, but wildfly needs to gracefully shutdown from jboss-cli.sh
|
||||
// stopAfter = test
|
||||
standardOutput "${buildDir}/reports/server.log"
|
||||
// these params tells the ExecFork plugin to block on startServer task until the port is opened or the string is seen in the ouput
|
||||
waitForPort = wildflyHttpPort
|
||||
waitForOutput = "Undertow HTTP listener default listening on 127.0.0.1:${wildflyHttpPort}"
|
||||
|
@ -112,7 +115,7 @@ tasks.withType(Test) {
|
|||
events "started"
|
||||
}
|
||||
|
||||
dependsOn project(':dd-java-agent').shadowJar, startServer
|
||||
dependsOn startServer
|
||||
}
|
||||
|
||||
// ensure that the wildfly server gets shutdown
|
||||
|
|
Loading…
Reference in New Issue