Change some common settings for smoke-tests
log server output to files. Fix server dependencies. Only run smoke
tests on standard JVMs.
MODIFY
dd-smoke-tests/dd-smoke-tests.gradle
dd-smoke-tests/dd-smoke-tests.gradle
-// 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'

MODIFY
dd-smoke-tests/play/play.gradle
dd-smoke-tests/play/play.gradle
@@ -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

MODIFY
dd-smoke-tests/wildfly/wildfly.gradle
dd-smoke-tests/wildfly/wildfly.gradle
@@ -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

Change some common settings for smoke-tests

log server output to files. Fix server dependencies. Only run smoke
tests on standard JVMs.