Moves all ittests to be tests under dd-java-agent.
This was weird having it as a separate project. Reduces the number of top level directories. There weren’t any existing tests in dd-java-agent’s test directory, so this seemed like a good place to put them.
This commit is contained in:
parent
20b134e356
commit
6a09f6e2b9
|
@ -1,56 +0,0 @@
|
||||||
// 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-java-agent-ittests'
|
|
||||||
|
|
||||||
evaluationDependsOn(':dd-java-agent:agent-tooling')
|
|
||||||
compileTestJava.dependsOn tasks.getByPath(':dd-java-agent:agent-tooling:testClasses')
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
testCompile project(':dd-trace-api')
|
|
||||||
testCompile project(':dd-trace-ot')
|
|
||||||
|
|
||||||
testCompile deps.opentracingMock
|
|
||||||
testCompile deps.testLogging
|
|
||||||
testCompile deps.guava
|
|
||||||
testCompile group: 'org.assertj', name: 'assertj-core', version: '2.9.+'
|
|
||||||
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.19.0'
|
|
||||||
|
|
||||||
testCompile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.4.2'
|
|
||||||
testCompile group: 'org.mongodb', name: 'mongodb-driver-async', version: '3.4.2'
|
|
||||||
// run embeded mongodb for integration testing
|
|
||||||
testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '1.50.5'
|
|
||||||
|
|
||||||
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3'
|
|
||||||
testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(Test) {
|
|
||||||
jvmArgs "-Ddd.writer.type=LogWriter", "-Ddd.service.name=java-app"
|
|
||||||
jvmArgs "-Ddatadog.slf4j.simpleLogger.defaultLogLevel=debug"
|
|
||||||
jvmArgs "-Dorg.slf4j.simpleLogger.defaultLogLevel=debug"
|
|
||||||
|
|
||||||
doFirst {
|
|
||||||
// Defining here to allow jacoco to be first on the command line.
|
|
||||||
jvmArgs "-javaagent:${project(':dd-java-agent').tasks.shadowJar.archivePath}"
|
|
||||||
}
|
|
||||||
|
|
||||||
testLogging {
|
|
||||||
events "started"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("disableShadowRelocate") && disableShadowRelocate) {
|
|
||||||
exclude 'datadog/trace/agent/integration/classloading/ShadowPackageRenamingTest.class'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn project(':dd-java-agent').shadowJar
|
|
||||||
}
|
|
||||||
|
|
||||||
parent.subprojects.collect { it.tasks.withType(Test) } each {
|
|
||||||
test.shouldRunAfter it
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration>
|
|
||||||
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<layout class="ch.qos.logback.classic.PatternLayout">
|
|
||||||
<Pattern>
|
|
||||||
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
|
||||||
</Pattern>
|
|
||||||
</layout>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<root level="DEBUG">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
</configuration>
|
|
|
@ -2,13 +2,17 @@ plugins {
|
||||||
id "com.github.johnrengelman.shadow" version "4.0.1"
|
id "com.github.johnrengelman.shadow" version "4.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set properties before any plugins get loaded
|
||||||
|
project.ext {
|
||||||
|
// Execute tests on all JVMs, even rare and outdated ones
|
||||||
|
integrationTests = true
|
||||||
|
}
|
||||||
|
|
||||||
description = 'dd-java-agent'
|
description = 'dd-java-agent'
|
||||||
|
|
||||||
apply from: "${rootDir}/gradle/java.gradle"
|
apply from: "${rootDir}/gradle/java.gradle"
|
||||||
apply from: "${rootDir}/gradle/publish.gradle"
|
apply from: "${rootDir}/gradle/publish.gradle"
|
||||||
|
|
||||||
jacocoTestReport.dependsOn ':dd-java-agent-ittests:test'
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Include subproject's shadowJar in the dd-java-agent jar.
|
* Include subproject's shadowJar in the dd-java-agent jar.
|
||||||
* Note jarname must end in .zip, or its classes will be on the classpath of
|
* Note jarname must end in .zip, or its classes will be on the classpath of
|
||||||
|
@ -84,3 +88,43 @@ shadowJar {
|
||||||
modifyPom {
|
modifyPom {
|
||||||
dependencies.removeAll { true }
|
dependencies.removeAll { true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
testCompile project(':dd-trace-api')
|
||||||
|
testCompile project(':dd-trace-ot')
|
||||||
|
|
||||||
|
testCompile deps.opentracingMock
|
||||||
|
testCompile deps.testLogging
|
||||||
|
testCompile deps.guava
|
||||||
|
testCompile group: 'org.assertj', name: 'assertj-core', version: '2.9.+'
|
||||||
|
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.19.0'
|
||||||
|
|
||||||
|
testCompile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.4.2'
|
||||||
|
testCompile group: 'org.mongodb', name: 'mongodb-driver-async', version: '3.4.2'
|
||||||
|
// run embeded mongodb for integration testing
|
||||||
|
testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '1.50.5'
|
||||||
|
|
||||||
|
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3'
|
||||||
|
testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(Test) {
|
||||||
|
jvmArgs "-Ddd.writer.type=LogWriter", "-Ddd.service.name=java-app"
|
||||||
|
jvmArgs "-Ddatadog.slf4j.simpleLogger.defaultLogLevel=debug"
|
||||||
|
jvmArgs "-Dorg.slf4j.simpleLogger.defaultLogLevel=debug"
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
// Defining here to allow jacoco to be first on the command line.
|
||||||
|
jvmArgs "-javaagent:${shadowJar.archivePath}"
|
||||||
|
}
|
||||||
|
|
||||||
|
testLogging {
|
||||||
|
events "started"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (project.hasProperty("disableShadowRelocate") && disableShadowRelocate) {
|
||||||
|
exclude 'datadog/trace/agent/integration/classloading/ShadowPackageRenamingTest.class'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependsOn shadowJar
|
||||||
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@ include ':dd-java-agent:agent-jmxfetch'
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
include ':dd-java-agent:testing'
|
include ':dd-java-agent:testing'
|
||||||
include ':dd-java-agent-ittests'
|
|
||||||
|
|
||||||
// instrumentation:
|
// instrumentation:
|
||||||
include ':dd-java-agent:instrumentation:akka-http-10.0'
|
include ':dd-java-agent:instrumentation:akka-http-10.0'
|
||||||
|
|
Loading…
Reference in New Issue