Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
b51891f
Update AgentTestRunner to use JUnit5
nikita-tkachenko-datadog Aug 1, 2025
fb23244
Fix iast and appsec test fixtures classpath
nikita-tkachenko-datadog Aug 1, 2025
6195dc7
Fix agent-testing tests
nikita-tkachenko-datadog Aug 8, 2025
dadece6
Fix IAST tests
nikita-tkachenko-datadog Aug 8, 2025
6bd53b0
Fix Jetty tests
nikita-tkachenko-datadog Aug 8, 2025
ee37411
Fix IAST tests
nikita-tkachenko-datadog Aug 8, 2025
cc364ab
Fix servlet tests
nikita-tkachenko-datadog Aug 8, 2025
952eb06
Fix log4j2 tests
nikita-tkachenko-datadog Aug 8, 2025
6a5561f
Fix Jetty tests
nikita-tkachenko-datadog Aug 8, 2025
8e7b825
Fix log4j2 tests
nikita-tkachenko-datadog Aug 8, 2025
96285e4
Removed a file committed accidentally
nikita-tkachenko-datadog Aug 8, 2025
b37d536
Minor cleanups
nikita-tkachenko-datadog Aug 8, 2025
b3600f1
Split CI Visibility test fixtures into a separate project
nikita-tkachenko-datadog Aug 8, 2025
1285825
Fix Appsec tests
nikita-tkachenko-datadog Aug 8, 2025
90ff66f
Fix tests after rebase conflicts
nikita-tkachenko-datadog Sep 1, 2025
092091e
Fix tests after rebase
nikita-tkachenko-datadog Sep 1, 2025
6f45038
Fix a SpotBugs warning
nikita-tkachenko-datadog Sep 1, 2025
3df713f
Remove instrumentation-testing dependency from Gradle and Maven smoke…
nikita-tkachenko-datadog Sep 1, 2025
e09ea5c
Fix compilation error
nikita-tkachenko-datadog Sep 1, 2025
cc30b04
Fix Iast tests
sarahchen6 Aug 21, 2025
d0e2740
Fix servlet/request-2 test
sarahchen6 Aug 28, 2025
7c2ec00
Fix instrumentation test
sarahchen6 Aug 22, 2025
f582dc8
Fix jetty test
sarahchen6 Aug 27, 2025
f4c259a
Give more time for aws sqs, kafka, and vertx tests
sarahchen6 Aug 27, 2025
17f661b
Run latestDepJava11Test on Java 11 only
sarahchen6 Aug 28, 2025
2b923ec
Fix vertx-web tests
sarahchen6 Aug 28, 2025
f8e440a
Fix play-ws tests
sarahchen6 Aug 28, 2025
4cf11b4
Address codenarc issue
sarahchen6 Aug 28, 2025
70ff95a
Loosen exception expectations for PlayWS only
sarahchen6 Aug 28, 2025
bea85ff
Do not run Karate test samples: they're only needed as inputs for ins…
nikita-tkachenko-datadog Sep 1, 2025
e602a2d
Restore super. method calls erroneously replaced with Object. during …
nikita-tkachenko-datadog Sep 1, 2025
2a5479b
Restore formatting
nikita-tkachenko-datadog Sep 1, 2025
b5f73cf
Suppress CIVis warning
sarahchen6 Aug 28, 2025
ef9f98d
Reset classloader matcher's cached state before each instrumentation …
nikita-tkachenko-datadog Sep 2, 2025
6fb4423
Do not load test classes with bootstrap classloader (fixes ExceptionH…
nikita-tkachenko-datadog Sep 2, 2025
4459ff3
Fix bootstrap class check to correctly handle classes whose names end…
nikita-tkachenko-datadog Sep 2, 2025
0ee9943
Evaluate isTest check lazily to avoid overhead
nikita-tkachenko-datadog Sep 2, 2025
dacb913
Extract common code in a utility method
nikita-tkachenko-datadog Sep 2, 2025
73f4895
Add comments for extra test time
sarahchen6 Sep 2, 2025
57315bd
Test jdbc latestdepjava11 on java 11+
sarahchen6 Sep 2, 2025
7ff7d47
Extract common code in a utility method
nikita-tkachenko-datadog Sep 3, 2025
0681bb5
Fix IAST tests
nikita-tkachenko-datadog Sep 3, 2025
11cb5b2
Import AgentTracer instead of FQN
nikita-tkachenko-datadog Sep 3, 2025
7836c1e
Rename AgentTestRunner and other instrumentation-testing classes + up…
nikita-tkachenko-datadog Sep 4, 2025
ef488c9
Merge branch 'master' into nikita-tkachenko/junit5-testing
nikita-tkachenko-datadog Sep 4, 2025
b281647
Rename now-redundant explicit JUnit 5 declaration for forkedTest tasks
nikita-tkachenko-datadog Sep 4, 2025
240ba4d
Rename instrumentation fixtures projects and add readme files
nikita-tkachenko-datadog Sep 4, 2025
f75a988
Restore original timeout for aws-java-sqs-1.0 forked tests
nikita-tkachenko-datadog Sep 4, 2025
95abf16
Restore original timeout for remaining tests
sarahchen6 Sep 4, 2025
94a3be7
Fix MakeTaintableInstrumentation instrumentation in pekko IAST tests
nikita-tkachenko-datadog Sep 4, 2025
679fa0c
Revert "Restore original timeout for remaining tests"
nikita-tkachenko-datadog Sep 4, 2025
c803820
Revert "Restore original timeout for aws-java-sqs-1.0 forked tests"
nikita-tkachenko-datadog Sep 4, 2025
70348ec
Propagate pekko IAST fix to latestDep tests as well
sarahchen6 Sep 4, 2025
450d944
Fix typo in readme
nikita-tkachenko-datadog Sep 5, 2025
65b8e63
Merge branch 'master' into nikita-tkachenko/junit5-testing
nikita-tkachenko-datadog Sep 8, 2025
42ed209
Cleanup gradle dependencies
nikita-tkachenko-datadog Sep 8, 2025
78ae232
Replace hamcrest matchers FQN with short name
nikita-tkachenko-datadog Sep 8, 2025
d9ddbc4
Remove redundant bootstrap prefixes copy
nikita-tkachenko-datadog Sep 8, 2025
525333c
Simplify isBootstrapClass method
nikita-tkachenko-datadog Sep 8, 2025
46cd888
Fix LLMOBS module dependencies
nikita-tkachenko-datadog Sep 8, 2025
ff52d3b
Merge branch 'master' into nikita-tkachenko/junit5-testing
nikita-tkachenko-datadog Sep 9, 2025
f88ddf8
Address review comments
nikita-tkachenko-datadog Sep 9, 2025
c50b95f
Remove redundant commit
nikita-tkachenko-datadog Sep 9, 2025
fd7a0d5
Use utility method instead of repeated code blocks
nikita-tkachenko-datadog Sep 9, 2025
42599ea
Fix compilation error after moving the files around
nikita-tkachenko-datadog Sep 9, 2025
c427898
Housekeeping: codeowners and coverage exclusions
nikita-tkachenko-datadog Sep 9, 2025
6b1df6f
Fix HTTPClientTest post refactoring
nikita-tkachenko-datadog Sep 9, 2025
36f5715
Clean up helper methods
sarahchen6 Sep 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
# @DataDog/asm-java (AppSec/IAST)
/buildSrc/call-site-instrumentation-plugin/ @DataDog/asm-java
/dd-java-agent/agent-iast/ @DataDog/asm-java
/dd-java-agent/appsec/appsec-test-fixtures/ @DataDog/asm-java
/dd-java-agent/instrumentation/*iast* @DataDog/asm-java
/dd-java-agent/instrumentation/*appsec* @DataDog/asm-java
/dd-java-agent/instrumentation/json/ @DataDog/asm-java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class Constants {
* packages which will be loaded on the bootstrap classloader
*
* <p>Updates should be mirrored in
* datadog.trace.agent.test.SpockRunner#BOOTSTRAP_PACKAGE_PREFIXES_COPY
* datadog.trace.agent.test.BootstrapClasspathSetup#BOOTSTRAP_PACKAGE_PREFIXES_COPY
*/
public static final String[] BOOTSTRAP_PACKAGE_PREFIXES = {
"datadog.slf4j",
Expand Down
19 changes: 6 additions & 13 deletions dd-java-agent/agent-ci-visibility/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ buildscript {

plugins {
id 'com.gradleup.shadow'
id 'java-test-fixtures'
}

apply from: "$rootDir/gradle/java.gradle"
Expand All @@ -42,29 +41,23 @@ dependencies {
api libs.slf4j

implementation libs.bundles.asm
implementation group: 'org.jacoco', name: 'org.jacoco.core', version: '0.8.12'
implementation group: 'org.jacoco', name: 'org.jacoco.report', version: '0.8.12'
implementation group: 'org.jacoco', name: 'org.jacoco.core', version: '0.8.13'
implementation group: 'org.jacoco', name: 'org.jacoco.report', version: '0.8.13'

implementation project(':communication')
implementation project(':components:json')
implementation project(':internal-api')
implementation project(':internal-api:internal-api-9')

testImplementation project(":utils:test-utils")
testImplementation project(':dd-java-agent:testing')
testImplementation("com.google.jimfs:jimfs:1.1") // an in-memory file system for testing code that works with files

testImplementation libs.scala
testImplementation libs.kotlin

testFixturesApi project(':dd-java-agent:testing')
testFixturesApi project(':utils:test-utils')

testFixturesApi group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'
testFixturesApi group: 'org.freemarker', name: 'freemarker', version: '2.3.31'
testFixturesApi group: 'com.jayway.jsonpath', name: 'json-path', version: '2.8.0'
testFixturesApi group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.0'
testFixturesApi group: 'org.msgpack', name: 'jackson-dataformat-msgpack', version: '0.9.6'
testFixturesApi group: 'org.xmlunit', name: 'xmlunit-core', version: '2.10.3'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'
testImplementation group: 'org.freemarker', name: 'freemarker', version: '2.3.31'
testImplementation group: 'org.msgpack', name: 'jackson-dataformat-msgpack', version: '0.9.6'

testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.2") // Required to update dependency lock files
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# civisibility-instrumentation-test-fixtures

This project contains common logic used in CI Visibility instrumentation tests.

The reason it is defined as a separate project rather than using testFixtures plugin in the parent module is because it
transitively pulls in :dd-java-agent:instrumentation-testing.
The latter contains datadog.trace.agent.test.BootstrapClasspathSetupListener that, when present on the classpath,
patches bootstrap CL adding some tracer classes to it.
This is needed for the instrumentation tests, but may break regular unit tests.
If this project used testFixtures, the listener would end up on the classpath of the parent project's unit tests, breaking them.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/version.gradle"

dependencies {
api project(':dd-java-agent:instrumentation-testing')
api project(':dd-java-agent:agent-ci-visibility:civisibility-test-fixtures')
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package datadog.trace.civisibility
import com.fasterxml.jackson.databind.ObjectMapper
import datadog.communication.serialization.GrowableBuffer
import datadog.communication.serialization.msgpack.MsgPackWriter
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.InstrumentationSpecification
import datadog.trace.agent.test.asserts.ListWriterAssert
import datadog.trace.api.Config
import datadog.trace.api.DDSpanTypes
Expand Down Expand Up @@ -50,6 +50,7 @@ import datadog.trace.civisibility.writer.ddintake.CiTestCycleMapperV1
import datadog.trace.common.writer.ListWriter
import datadog.trace.common.writer.RemoteMapper
import datadog.trace.core.DDSpan
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
import org.msgpack.jackson.dataformat.MessagePackFactory

import java.lang.reflect.Method
Expand All @@ -61,7 +62,7 @@ import java.util.concurrent.TimeUnit
import java.util.function.Predicate
import java.util.stream.Collectors

abstract class CiVisibilityInstrumentationTest extends AgentTestRunner {
abstract class CiVisibilityInstrumentationTest extends InstrumentationSpecification {

public static final int SLOW_TEST_THRESHOLD_MILLIS = 1000
public static final int VERY_SLOW_TEST_THRESHOLD_MILLIS = 2000
Expand Down Expand Up @@ -290,6 +291,7 @@ abstract class CiVisibilityInstrumentationTest extends AgentTestRunner {
return true
}

@SuppressFBWarnings("UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS")
boolean waitForSpan(Predicate<DDSpan> predicate, long timeoutMillis) {
long deadline = System.currentTimeMillis() + timeoutMillis
synchronized (lock) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/version.gradle"

dependencies {
api project(':dd-java-agent:agent-ci-visibility')
api project(':dd-java-agent:testing')

api group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'
api group: 'org.freemarker', name: 'freemarker', version: '2.3.31'
api group: 'com.jayway.jsonpath', name: 'json-path', version: '2.8.0'
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.0'
api group: 'org.msgpack', name: 'jackson-dataformat-msgpack', version: '0.9.6'
api group: 'org.xmlunit', name: 'xmlunit-core', version: '2.10.3'
}

Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ abstract class CiVisibilityTestUtils {
println "Expected JSON: $expectedJson"
println "Actual JSON: $actualJson"
}
throw new AssertionFailedError("Coverage report events mismatch", expectedJson, actualJson, e)
throw new AssertionFailedError("Expected and actual JSON mismatch", expectedJson, actualJson, e)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import datadog.trace.api.civisibility.config.TestFQN
import datadog.trace.api.civisibility.config.TestIdentifier
import datadog.trace.api.civisibility.config.TestMetadata
import datadog.trace.api.civisibility.telemetry.CiVisibilityMetricCollector
import datadog.trace.civisibility.CiVisibilityTestUtils
import datadog.trace.api.intake.Intake
import freemarker.core.Environment
import freemarker.core.InvalidReferenceException
import freemarker.template.Template
import freemarker.template.TemplateException
import freemarker.template.TemplateExceptionHandler
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import org.apache.commons.io.IOUtils
Expand Down Expand Up @@ -233,7 +237,7 @@ class ConfigurationApiImplTest extends Specification {
httpServer {
handlers {
prefix(path) {
def expectedRequestBody = CiVisibilityTestUtils.getFreemarkerTemplate(requestTemplate, requestData)
def expectedRequestBody = getFreemarkerTemplate(requestTemplate, requestData)

def response = response
try {
Expand All @@ -242,7 +246,7 @@ class ConfigurationApiImplTest extends Specification {
response.status(400).send(error.getMessage().bytes)
}

def responseBody = CiVisibilityTestUtils.getFreemarkerTemplate(responseTemplate, responseData).bytes
def responseBody = getFreemarkerTemplate(responseTemplate, responseData).bytes
def header = request.getHeader("Accept-Encoding")
def gzipSupported = header != null && header.contains("gzip")
if (gzipSupported) {
Expand Down Expand Up @@ -315,4 +319,37 @@ class ConfigurationApiImplTest extends Specification {
}
return bitSet
}

static final TemplateExceptionHandler SUPPRESS_EXCEPTION_HANDLER = new TemplateExceptionHandler() {
@Override
void handleTemplateException(TemplateException e, Environment environment, Writer writer) throws TemplateException {
if (e instanceof InvalidReferenceException) {
writer.write('"<VALUE_MISSING>"')
} else {
throw e
}
}
}

static final freemarker.template.Configuration FREEMARKER = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_30) { {
setClassLoaderForTemplateLoading(ConfigurationApiImplTest.classLoader, "")
setDefaultEncoding("UTF-8")
setTemplateExceptionHandler(SUPPRESS_EXCEPTION_HANDLER)
setLogTemplateExceptions(false)
setWrapUncheckedExceptions(true)
setFallbackOnNullLoopVariable(false)
setNumberFormat("0.######")
}
}

static String getFreemarkerTemplate(String templatePath, Map<String, Object> replacements, List<Map<?, ?>> replacementsSource = []) {
try {
Template coveragesTemplate = FREEMARKER.getTemplate(templatePath)
StringWriter coveragesOut = new StringWriter()
coveragesTemplate.process(replacements, coveragesOut)
return coveragesOut.toString()
} catch (Exception e) {
throw new RuntimeException("Could not get Freemarker template " + templatePath + "; replacements map: " + replacements + "; replacements source: " + replacementsSource, e)
}
}
}
5 changes: 2 additions & 3 deletions dd-java-agent/agent-iast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import net.ltgt.gradle.errorprone.CheckSeverity
plugins {
id 'com.gradleup.shadow'
id 'me.champeau.jmh'
id 'java-test-fixtures'
id 'com.google.protobuf' version '0.8.18'
id 'net.ltgt.errorprone' version '3.1.0'
}
Expand Down Expand Up @@ -52,8 +51,8 @@ dependencies {
implementation libs.moshi
implementation libs.bundles.asm

testFixturesApi project(':dd-java-agent:testing')
testFixturesApi project(':utils:test-utils')
testImplementation project(':utils:test-utils')
testImplementation project(':dd-java-agent:agent-bootstrap')
testImplementation libs.bytebuddy
testImplementation('org.skyscreamer:jsonassert:1.5.1')
testImplementation libs.groovy.yaml
Expand Down
10 changes: 10 additions & 0 deletions dd-java-agent/agent-iast/iast-test-fixtures/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# iast-test-fixtures

This project contains common logic used in IAST instrumentation tests.

The reason it is defined as a separate project rather than using testFixtures plugin in the parent module is because it
transitively pulls in :dd-java-agent:instrumentation-testing.
The latter contains datadog.trace.agent.test.BootstrapClasspathSetupListener that, when present on the classpath,
patches bootstrap CL adding some tracer classes to it.
This is needed for the instrumentation tests, but may break regular unit tests.
If this project used testFixtures, the listener would end up on the classpath of the parent project's unit tests, breaking them.
7 changes: 7 additions & 0 deletions dd-java-agent/agent-iast/iast-test-fixtures/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/version.gradle"

dependencies {
api project(':dd-java-agent:agent-iast')
api project(':dd-java-agent:instrumentation-testing')
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.datadog.iast.test

import com.datadog.iast.model.Source
import com.datadog.iast.taint.TaintedObjects
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.InstrumentationSpecification
import datadog.trace.agent.tooling.bytebuddy.iast.TaintableVisitor
import datadog.trace.api.gateway.CallbackProvider
import datadog.trace.api.gateway.Events
Expand All @@ -15,7 +15,7 @@ import datadog.trace.bootstrap.instrumentation.api.TagContext
import datadog.trace.core.DDSpan


class IastAgentTestRunner extends AgentTestRunner implements IastRequestContextPreparationTrait {
class IastAgentTestRunner extends InstrumentationSpecification implements IastRequestContextPreparationTrait {
public static final EMPTY_SOURCE = new Source(SourceTypes.NONE, '', '')

void configurePreAgent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import org.slf4j.LoggerFactory
import java.util.function.BiFunction
import java.util.function.Supplier

import static datadog.trace.bootstrap.instrumentation.api.AgentTracer.get

trait IastRequestContextPreparationTrait {

static void iastSystemSetup(Closure reqEndAction = null) {
Expand Down Expand Up @@ -43,7 +41,7 @@ trait IastRequestContextPreparationTrait {
}

static void iastSystemCleanup() {
get().getSubscriptionService(RequestContextSlot.IAST).reset()
AgentTracer.get().getSubscriptionService(RequestContextSlot.IAST).reset()
InstrumentationBridge.clearIastModules()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.datadog.iast.test

import datadog.trace.api.iast.SourceTypes
import okhttp3.FormBody
import okhttp3.MediaType
import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.FormBody
import org.hamcrest.Matchers
import spock.lang.IgnoreIf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ class TaintedObjectCollection {
} else if (obj instanceof Pattern) {
valueMatcher = Matchers.matchesPattern(obj)
} else {
valueMatcher = equalTo(obj)
valueMatcher = Matchers.equalTo(obj)
}
}

private static Matcher toMatcher(Object obj) {
if (obj instanceof Matcher) {
obj
} else if (obj instanceof Pattern) {
matchesPattern(obj)
Matchers.matchesPattern(obj)
} else if (obj == null) {
nullValue()
Matchers.nullValue()
} else {
equalTo(obj)
Matchers.equalTo(obj)
}
}

Expand All @@ -79,15 +79,15 @@ class TaintedObjectCollection {
}

void range(int start, int length, SourceMatcher source) {
ranges << new RangeMatcher(start, equalTo(length), source)
ranges << new RangeMatcher(start, Matchers.equalTo(length), source)
}

void range(int start, Matcher<Integer> length, SourceMatcher source) {
ranges << new RangeMatcher(start, length, source)
}

void range(SourceMatcher source) {
ranges << new RangeMatcher(0, greaterThan(0), source)
ranges << new RangeMatcher(0, Matchers.greaterThan(0), source)
}

@Override
Expand Down
6 changes: 1 addition & 5 deletions dd-java-agent/agent-llmobs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ buildscript {

plugins {
id 'com.gradleup.shadow'
id 'java-test-fixtures'
}

apply from: "$rootDir/gradle/java.gradle"
Expand All @@ -28,11 +27,8 @@ dependencies {
implementation project(':components:json')
implementation project(':internal-api')

testImplementation project(":utils:test-utils")
testImplementation project(':dd-java-agent:testing')
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.12.0'

testFixturesApi project(':dd-java-agent:testing')
testFixturesApi project(':utils:test-utils')
}

shadowJar {
Expand Down
10 changes: 10 additions & 0 deletions dd-java-agent/appsec/appsec-test-fixtures/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# appsec-fixtures

This project contains common logic used in Appsec instrumentation tests.

The reason it is defined as a separate project rather than using testFixtures plugin in the parent module is because it
transitively pulls in :dd-java-agent:instrumentation-testing.
The latter contains datadog.trace.agent.test.BootstrapClasspathSetupListener that, when present on the classpath,
patches bootstrap CL adding some tracer classes to it.
This is needed for the instrumentation tests, but may break regular unit tests.
If this project used testFixtures, the listener would end up on the classpath of the parent project's unit tests, breaking them.
11 changes: 11 additions & 0 deletions dd-java-agent/appsec/appsec-test-fixtures/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/version.gradle"

dependencies {
api project(':dd-java-agent:appsec')
api project(':dd-java-agent:instrumentation-testing')
}

configurations.api {
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
}
Loading