Skip to content

Commit b60f339

Browse files
committed
feat(testing): Add smoke test JUnit framework
1 parent d40cb4c commit b60f339

31 files changed

Lines changed: 3841 additions & 38 deletions

‎dd-smoke-tests/build.gradle‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ description = 'dd-smoke-tests'
88

99
dependencies {
1010
api libs.okhttp
11+
api libs.testcontainers
1112
api project(':dd-java-agent:testing')
1213
api project(':utils:test-agent-utils:decoder')
1314

1415
compileOnly(libs.junit.jupiter)
15-
1616
compileOnly(libs.bundles.groovy)
1717
compileOnly(libs.bundles.spock)
18+
19+
// Checks the mock backend's remote-config payload with the tracer's own response parser.
20+
testImplementation project(':remote-config:remote-config-core')
1821
}
1922

2023
tasks.withType(GroovyCompile).configureEach {

‎dd-smoke-tests/gradle.lockfile‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ com.datadoghq:dd-instrument-java:0.0.4=compileClasspath,runtimeClasspath,testCom
1313
com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
1414
com.datadoghq:java-dogstatsd-client:4.4.5=runtimeClasspath,testRuntimeClasspath
1515
com.datadoghq:sketches-java:0.8.3=runtimeClasspath,testRuntimeClasspath
16+
com.fasterxml.jackson.core:jackson-annotations:2.10.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
17+
com.github.docker-java:docker-java-api:3.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
18+
com.github.docker-java:docker-java-transport-zerodep:3.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
19+
com.github.docker-java:docker-java-transport:3.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
1620
com.github.javaparser:javaparser-core:3.25.6=codenarc
1721
com.github.jnr:jffi:1.3.15=runtimeClasspath,testRuntimeClasspath
1822
com.github.jnr:jnr-a64asm:1.0.0=runtimeClasspath,testRuntimeClasspath
@@ -47,20 +51,21 @@ io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
4751
io.sqreen:libsqreen:17.5.0=runtimeClasspath,testRuntimeClasspath
4852
javax.servlet:javax.servlet-api:3.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
4953
jaxen:jaxen:2.0.6=spotbugs
50-
junit:junit:4.13.2=runtimeClasspath,testRuntimeClasspath
54+
junit:junit:4.13.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
5155
net.bytebuddy:byte-buddy-agent:1.18.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
5256
net.bytebuddy:byte-buddy:1.18.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
5357
net.java.dev.jna:jna-platform:5.8.0=runtimeClasspath,testRuntimeClasspath
54-
net.java.dev.jna:jna:5.8.0=runtimeClasspath,testRuntimeClasspath
58+
net.java.dev.jna:jna:5.13.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
5559
net.sf.saxon:Saxon-HE:12.10=spotbugs
5660
org.apache.ant:ant-antlr:1.10.14=codenarc
5761
org.apache.ant:ant-junit:1.10.14=codenarc
5862
org.apache.bcel:bcel:6.12.0=spotbugs
63+
org.apache.commons:commons-compress:1.24.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
5964
org.apache.commons:commons-lang3:3.20.0=spotbugs
6065
org.apache.commons:commons-text:1.15.0=spotbugs
6166
org.apache.logging.log4j:log4j-api:2.26.1=spotbugs
6267
org.apache.logging.log4j:log4j-core:2.26.1=spotbugs
63-
org.apiguardian:apiguardian-api:1.1.2=compileClasspath,testCompileClasspath
68+
org.apiguardian:apiguardian-api:1.1.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
6469
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
6570
org.codehaus.groovy:groovy-docgenerator:3.0.23=codenarc
6671
org.codehaus.groovy:groovy-groovydoc:3.0.23=codenarc
@@ -73,10 +78,11 @@ org.codehaus.groovy:groovy:3.0.25=compileClasspath,testCompileClasspath,testRunt
7378
org.codenarc:CodeNarc:3.7.0=codenarc
7479
org.dom4j:dom4j:2.2.0=spotbugs
7580
org.gmetrics:GMetrics:2.1.0=codenarc
76-
org.hamcrest:hamcrest-core:1.3=runtimeClasspath,testRuntimeClasspath
81+
org.hamcrest:hamcrest-core:1.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
7782
org.hamcrest:hamcrest:3.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
7883
org.jctools:jctools-core-jdk11:4.0.6=runtimeClasspath,testRuntimeClasspath
7984
org.jctools:jctools-core:4.0.6=runtimeClasspath,testRuntimeClasspath
85+
org.jetbrains:annotations:17.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
8086
org.jspecify:jspecify:1.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
8187
org.junit.jupiter:junit-jupiter-api:5.14.1=compileClasspath,testCompileClasspath,testRuntimeClasspath
8288
org.junit.jupiter:junit-jupiter-engine:5.14.1=testRuntimeClasspath
@@ -103,16 +109,19 @@ org.ow2.asm:asm-tree:9.7.1=runtimeClasspath,testRuntimeClasspath
103109
org.ow2.asm:asm-util:9.10.1=spotbugs
104110
org.ow2.asm:asm-util:9.7.1=runtimeClasspath,testRuntimeClasspath
105111
org.ow2.asm:asm:9.10.1=compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
112+
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
106113
org.slf4j:jcl-over-slf4j:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
107114
org.slf4j:jul-to-slf4j:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
108115
org.slf4j:log4j-over-slf4j:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
109-
org.slf4j:slf4j-api:1.7.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
116+
org.slf4j:slf4j-api:1.7.36=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
110117
org.slf4j:slf4j-api:2.0.17=spotbugsSlf4j
111118
org.slf4j:slf4j-api:2.0.18=spotbugs
112119
org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j
120+
org.snakeyaml:snakeyaml-engine:2.9=testRuntimeClasspath
113121
org.spockframework:spock-bom:2.4-groovy-3.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
114122
org.spockframework:spock-core:2.4-groovy-3.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
115123
org.tabletest:tabletest-junit:1.2.2=testCompileClasspath,testRuntimeClasspath
116124
org.tabletest:tabletest-parser:1.2.1=testCompileClasspath,testRuntimeClasspath
125+
org.testcontainers:testcontainers:1.21.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
117126
org.xmlresolver:xmlresolver:5.3.3=spotbugs
118127
empty=annotationProcessor,spotbugsPlugins,testAnnotationProcessor

‎dd-smoke-tests/src/main/groovy/datadog/smoketest/ProcessManager.groovy‎

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package datadog.smoketest
22

3+
import static datadog.smoketest.KnownLogExclusion.isKnownFlakyTestLogEntry
4+
35
import com.google.common.collect.ImmutableSet
46
import datadog.trace.agent.test.utils.PortUtils
57
import java.nio.file.Files
@@ -178,31 +180,10 @@ abstract class ProcessManager extends Specification {
178180
* These will be checked on suite shutdown, or explicitly by calling {@link #assertNoErrorLogs()}.
179181
*/
180182
boolean isErrorLog(String line) {
181-
// FIXME: Flaky profiler exception. See PROF-11068.
182-
if (line.contains('ERROR com.datadog.profiling.controller.ProfilingSystem - Fatal exception in profiling thread, trying to continue')) {
183-
return false
184-
}
185-
186-
// FIXME: Flaky on Spring Boot, e.g. IastSpringBootSmokeTest :dd-smoke-tests:spring-boot-2.6-webmvc:test semeru8
187-
if (line.contains("I/O reactor terminated abnormally")) {
188-
return false
189-
}
190-
191-
// FIXME: Flaky profiler exception. See PROF-11072.
192-
if (line.contains("ERROR com.datadog.profiling.controller.ProfilingSystem - Fatal exception during profiling startup")) {
183+
// Skip known log entries from flaky tests
184+
if (isKnownFlakyTestLogEntry(line)) {
193185
return false
194186
}
195-
196-
// FIXME: Observed in semeru8 datadog.smoketest.WildflySmokeTest
197-
if (line.contains("ERROR datadog.trace.agent.jmxfetch.JMXFetch - jmx collector exited with result: 0")) {
198-
return false
199-
}
200-
201-
// FIXME: Spotted on multiple Spring Boot jobs, e.g. semeru11 IastSpringBootSmokeTest$WithGlobalContext
202-
if (line.contains("I/O reactor terminated abnormally")) {
203-
return false
204-
}
205-
206187
return line.contains("ERROR") || line.contains("ASSERTION FAILED")
207188
|| line.contains("Failed to handle exception in instrumentation")
208189
}

0 commit comments

Comments
 (0)