Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ test_debugger_arm64:
- !reference [.test_job_arm64, script]

test_smoke:
extends: .test_job
extends: .test_job_with_test_agent
# needs:parallel:matrix limits this job to a specific build_tests combination.
# Keep matrix vars exact and in build_tests declaration order:
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
Expand All @@ -1135,7 +1135,7 @@ test_smoke:
matrix: *test_matrix_8

test_smoke_arm64:
extends: .test_job_arm64
extends: .test_job_arm64_with_test_agent
variables:
<<: *tier_l_variables
GRADLE_TARGET: "stageMainDist :smokeTest"
Expand Down
19 changes: 19 additions & 0 deletions dd-smoke-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ dependencies {

compileOnly(libs.junit.jupiter)

// Testcontainers backs the test-agent .container() backend (TestAgentBackend). Kept compileOnly
// so it is NOT forced onto the ~79 modules that depend on this base for the mock/.external()
// backends; modules using .container() opt in with their own testImplementation dependency.
compileOnly(libs.testcontainers)

compileOnly(libs.bundles.groovy)
compileOnly(libs.bundles.spock)

testImplementation(libs.testcontainers)
}

tasks.withType(Test).configureEach {
// Cap concurrent Testcontainers usage across the build (TestAgentBackend container tests).
usesService(testcontainersLimit)
}

tasks.withType(GroovyCompile).configureEach {
Expand Down Expand Up @@ -42,6 +54,13 @@ subprojects { Project subProj ->

// Tests depend on this to know where to run things and what agent jar to use
jvmArgs "-Ddatadog.smoketest.builddir=${buildDir}"
// Forward an optional test-agent image override to the test JVM, so TraceBackend.testAgent()
// runs locally without internal-registry access, e.g.
// -Ddatadog.smoketest(.testagent.image=ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.44.0
def testAgentImage = System.getProperty("datadog.smoketest.testagent.image")
if (testAgentImage != null) {
jvmArgs "-Ddatadog.smoketest.testagent.image=${testAgentImage}"
}
jvmArgumentProviders.add(new CommandLineArgumentProvider() {
@Override
Iterable<String> asArguments() {
Expand Down
20 changes: 15 additions & 5 deletions dd-smoke-tests/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ com.datadoghq:dd-instrument-java:0.0.4=compileClasspath,runtimeClasspath,testCom
com.datadoghq:dd-javac-plugin-client:0.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.datadoghq:java-dogstatsd-client:4.4.5=runtimeClasspath,testRuntimeClasspath
com.datadoghq:sketches-java:0.8.3=runtimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.10.3=compileClasspath,testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-api:3.4.2=compileClasspath,testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-transport-zerodep:3.4.2=compileClasspath,testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-transport:3.4.2=compileClasspath,testCompileClasspath,testRuntimeClasspath
com.github.javaparser:javaparser-core:3.25.6=codenarc
com.github.jnr:jffi:1.3.15=runtimeClasspath,testRuntimeClasspath
com.github.jnr:jnr-a64asm:1.0.0=runtimeClasspath,testRuntimeClasspath
Expand Down Expand Up @@ -47,20 +51,22 @@ io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
io.sqreen:libsqreen:17.4.0=runtimeClasspath,testRuntimeClasspath
javax.servlet:javax.servlet-api:3.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
jaxen:jaxen:2.0.0=spotbugs
junit:junit:4.13.2=runtimeClasspath,testRuntimeClasspath
junit:junit:4.13.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy-agent:1.18.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.18.10=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna-platform:5.8.0=runtimeClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.8.0=runtimeClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.13.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.8.0=runtimeClasspath
net.sf.saxon:Saxon-HE:12.9=spotbugs
org.apache.ant:ant-antlr:1.10.14=codenarc
org.apache.ant:ant-junit:1.10.14=codenarc
org.apache.bcel:bcel:6.11.0=spotbugs
org.apache.commons:commons-compress:1.24.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.19.0=spotbugs
org.apache.commons:commons-text:1.14.0=spotbugs
org.apache.logging.log4j:log4j-api:2.25.2=spotbugs
org.apache.logging.log4j:log4j-core:2.25.2=spotbugs
org.apiguardian:apiguardian-api:1.1.2=compileClasspath,testCompileClasspath
org.apiguardian:apiguardian-api:1.1.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
org.codehaus.groovy:groovy-docgenerator:3.0.23=codenarc
org.codehaus.groovy:groovy-groovydoc:3.0.23=codenarc
Expand All @@ -73,10 +79,11 @@ org.codehaus.groovy:groovy:3.0.25=compileClasspath,testCompileClasspath,testRunt
org.codenarc:CodeNarc:3.7.0=codenarc
org.dom4j:dom4j:2.2.0=spotbugs
org.gmetrics:GMetrics:2.1.0=codenarc
org.hamcrest:hamcrest-core:1.3=runtimeClasspath,testRuntimeClasspath
org.hamcrest:hamcrest-core:1.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest:3.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jctools:jctools-core-jdk11:4.0.6=runtimeClasspath,testRuntimeClasspath
org.jctools:jctools-core:4.0.6=runtimeClasspath,testRuntimeClasspath
org.jetbrains:annotations:17.0.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.14.1=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.14.1=testRuntimeClasspath
Expand Down Expand Up @@ -104,15 +111,18 @@ org.ow2.asm:asm-util:9.7.1=runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm-util:9.9=spotbugs
org.ow2.asm:asm:9.10.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.9=spotbugs
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:jcl-over-slf4j:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:jul-to-slf4j:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:log4j-over-slf4j:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.32=runtimeClasspath
org.slf4j:slf4j-api:1.7.36=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.0.17=spotbugs,spotbugsSlf4j
org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j
org.spockframework:spock-bom:2.4-groovy-3.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.spockframework:spock-core:2.4-groovy-3.0=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.tabletest:tabletest-junit:1.2.1=testCompileClasspath,testRuntimeClasspath
org.tabletest:tabletest-parser:1.2.0=testCompileClasspath,testRuntimeClasspath
org.testcontainers:testcontainers:1.21.4=compileClasspath,testCompileClasspath,testRuntimeClasspath
org.xmlresolver:xmlresolver:5.3.3=spotbugs
empty=annotationProcessor,spotbugsPlugins,testAnnotationProcessor
4 changes: 4 additions & 0 deletions dd-smoke-tests/opentelemetry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ dependencies {
implementation group: 'io.opentelemetry', name: 'opentelemetry-api', version: '1.4.0'
implementation group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-instrumentation-annotations', version: '1.20.0'
testImplementation project(':dd-smoke-tests')
// Needed to use TraceBackend.testAgent(): Testcontainers is compileOnly on the smoke-test base
// (so it isn't forced on every consumer), so a module using the container backend opts in here.
testImplementation libs.testcontainers
}

tasks.withType(Test).configureEach {
usesService(testcontainersLimit)
dependsOn 'shadowJar'
def shadowJarTask = tasks.named('shadowJar', ShadowJar)
jvmArgumentProviders.add(new CommandLineArgumentProvider() {
Expand Down
18 changes: 13 additions & 5 deletions dd-smoke-tests/opentelemetry/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ com.datadoghq:dd-instrument-java:0.0.4=testCompileClasspath,testRuntimeClasspath
com.datadoghq:dd-javac-plugin-client:0.2.2=testCompileClasspath,testRuntimeClasspath
com.datadoghq:java-dogstatsd-client:4.4.5=testRuntimeClasspath
com.datadoghq:sketches-java:0.8.3=testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.10.3=testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-api:3.4.2=testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-transport-zerodep:3.4.2=testCompileClasspath,testRuntimeClasspath
com.github.docker-java:docker-java-transport:3.4.2=testCompileClasspath,testRuntimeClasspath
com.github.javaparser:javaparser-core:3.25.6=codenarc
com.github.jnr:jffi:1.3.15=testRuntimeClasspath
com.github.jnr:jnr-a64asm:1.0.0=testRuntimeClasspath
Expand Down Expand Up @@ -50,20 +54,21 @@ io.opentelemetry:opentelemetry-context:1.19.0=compileClasspath,runtimeClasspath,
io.sqreen:libsqreen:17.4.0=testRuntimeClasspath
javax.servlet:javax.servlet-api:3.1.0=testCompileClasspath,testRuntimeClasspath
jaxen:jaxen:2.0.0=spotbugs
junit:junit:4.13.2=testRuntimeClasspath
junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy-agent:1.18.10=testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.18.10=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna-platform:5.8.0=testRuntimeClasspath
net.java.dev.jna:jna:5.8.0=testRuntimeClasspath
net.java.dev.jna:jna:5.13.0=testCompileClasspath,testRuntimeClasspath
net.sf.saxon:Saxon-HE:12.9=spotbugs
org.apache.ant:ant-antlr:1.10.14=codenarc
org.apache.ant:ant-junit:1.10.14=codenarc
org.apache.bcel:bcel:6.11.0=spotbugs
org.apache.commons:commons-compress:1.24.0=testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.19.0=spotbugs
org.apache.commons:commons-text:1.14.0=spotbugs
org.apache.logging.log4j:log4j-api:2.25.2=spotbugs
org.apache.logging.log4j:log4j-core:2.25.2=spotbugs
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testRuntimeClasspath
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
org.codehaus.groovy:groovy-docgenerator:3.0.23=codenarc
org.codehaus.groovy:groovy-groovydoc:3.0.23=codenarc
Expand All @@ -76,10 +81,11 @@ org.codehaus.groovy:groovy:3.0.25=testCompileClasspath,testRuntimeClasspath
org.codenarc:CodeNarc:3.7.0=codenarc
org.dom4j:dom4j:2.2.0=spotbugs
org.gmetrics:GMetrics:2.1.0=codenarc
org.hamcrest:hamcrest-core:1.3=testRuntimeClasspath
org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest:3.0=testCompileClasspath,testRuntimeClasspath
org.jctools:jctools-core-jdk11:4.0.6=testRuntimeClasspath
org.jctools:jctools-core:4.0.6=testRuntimeClasspath
org.jetbrains:annotations:17.0.0=testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.14.1=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.14.1=testRuntimeClasspath
Expand Down Expand Up @@ -107,15 +113,17 @@ org.ow2.asm:asm-util:9.7.1=testRuntimeClasspath
org.ow2.asm:asm-util:9.9=spotbugs
org.ow2.asm:asm:9.10.1=testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.9=spotbugs
org.rnorth.duct-tape:duct-tape:1.0.8=testCompileClasspath,testRuntimeClasspath
org.slf4j:jcl-over-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath
org.slf4j:jul-to-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath
org.slf4j:log4j-over-slf4j:1.7.30=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.32=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.36=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.0.17=spotbugs,spotbugsSlf4j
org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j
org.spockframework:spock-bom:2.4-groovy-3.0=testCompileClasspath,testRuntimeClasspath
org.spockframework:spock-core:2.4-groovy-3.0=testCompileClasspath,testRuntimeClasspath
org.tabletest:tabletest-junit:1.2.1=testCompileClasspath,testRuntimeClasspath
org.tabletest:tabletest-parser:1.2.0=testCompileClasspath,testRuntimeClasspath
org.testcontainers:testcontainers:1.21.4=testCompileClasspath,testRuntimeClasspath
org.xmlresolver:xmlresolver:5.3.3=spotbugs
empty=annotationProcessor,shadow,spotbugsPlugins,testAnnotationProcessor

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package datadog.smoketest;

import static datadog.smoketest.backend.TraceBackend.testAgent;
import static datadog.smoketest.trace.SpanMatcher.span;
import static datadog.smoketest.trace.TraceMatcher.trace;
import static java.util.concurrent.TimeUnit.SECONDS;

import java.io.File;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

class OpenTelemetrySmokeTest {
private static final int TIMEOUT_SECONDS = 30;
private static final File WORKING_DIRECTORY =
new File(System.getProperty("datadog.smoketest.builddir"));
private static final String APPLICATION_JAR =
System.getProperty("datadog.smoketest.shadowJar.path");

@RegisterExtension
static final SmokeCliApp app =
SmokeCliApp.named("opentelemetry")
.jar(APPLICATION_JAR)
.jvmArgs("-Ddd.trace.otel.enabled=true")
.workingDirectory(WORKING_DIRECTORY)
.backend(testAgent())
.build();

@Test
void receivesTraces() {
app.traces()
.assertTraces(
trace(span().root().operationName("Application.annotatedSpan")),
trace(span().root().resourceName("span-0")),
trace(span().root().resourceName("span-1")),
trace(span().root().resourceName("span-2")),
trace(span().root().resourceName("span-3")),
trace(span().root().resourceName("span-4")),
trace(span().root().resourceName("span-5")),
trace(span().root().resourceName("span-6")),
trace(span().root().resourceName("span-7")),
trace(span().root().resourceName("span-8")),
trace(span().root().resourceName("span-9")));
app.assertCompletesWithValue(TIMEOUT_SECONDS, SECONDS, 0);
}
}
1 change: 1 addition & 0 deletions dd-smoke-tests/spring-boot-rabbit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {

testImplementation project(':dd-smoke-tests')
testImplementation group: 'org.testcontainers', name: 'rabbitmq', version: libs.versions.testcontainers.get()
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: libs.versions.testcontainers.get()
}

tasks.withType(Test).configureEach {
Expand Down
3 changes: 2 additions & 1 deletion dd-smoke-tests/spring-boot-rabbit/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ org.apache.logging.log4j:log4j-to-slf4j:2.14.1=compileClasspath,runtimeClasspath
org.apache.tomcat.embed:tomcat-embed-core:9.0.52=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.tomcat.embed:tomcat-embed-el:9.0.52=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.tomcat.embed:tomcat-embed-websocket:9.0.52=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testRuntimeClasspath
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
org.codehaus.groovy:groovy-docgenerator:3.0.23=codenarc
org.codehaus.groovy:groovy-groovydoc:3.0.23=codenarc
Expand Down Expand Up @@ -158,6 +158,7 @@ org.springframework:spring-web:5.3.9=compileClasspath,runtimeClasspath,testCompi
org.springframework:spring-webmvc:5.3.9=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.tabletest:tabletest-junit:1.2.1=testCompileClasspath,testRuntimeClasspath
org.tabletest:tabletest-parser:1.2.0=testCompileClasspath,testRuntimeClasspath
org.testcontainers:junit-jupiter:1.21.4=testCompileClasspath,testRuntimeClasspath
org.testcontainers:rabbitmq:1.21.4=testCompileClasspath,testRuntimeClasspath
org.testcontainers:testcontainers:1.21.4=testCompileClasspath,testRuntimeClasspath
org.xmlresolver:xmlresolver:5.3.3=spotbugs
Expand Down
Loading
Loading