Use test set instead of submodule for Slick tests
MODIFY
dd-java-agent/instrumentation/java-concurrent/java-concurrent.gradle
dd-java-agent/instrumentation/java-concurrent/java-concurrent.gradle
@@ -3,6 +3,15 @@ apply from: "${rootDir}/gradle/test-with-scala.gradle"
apply plugin: 'org.unbroken-dome.test-sets'
+testSets {
+ slickTest
+}
+
+compileSlickTestGroovy {
+ classpath = classpath.plus(files(compileSlickTestScala.destinationDir))
+ dependsOn compileSlickTestScala
+}
+
dependencies {
compile project(':dd-trace-api')
compile project(':dd-java-agent:agent-tooling')
@@ -14,4 +23,15 @@ dependencies {
testCompile project(':dd-java-agent:testing')
testCompile project(':dd-java-agent:instrumentation:trace-annotation')
+
+ slickTestCompile project(':dd-java-agent:testing')
+ slickTestCompile project(':dd-java-agent:instrumentation:java-concurrent')
+ slickTestCompile project(':dd-java-agent:instrumentation:trace-annotation')
+ slickTestCompile project(':dd-java-agent:instrumentation:jdbc')
+ slickTestCompile group: 'org.scala-lang', name: 'scala-library', version: '2.11.12'
+ slickTestCompile group: 'com.typesafe.slick', name: 'slick_2.11', version: '3.2.0'
+ slickTestCompile group: 'com.h2database', name: 'h2', version: '1.4.197'
}
+
+// Run Slick library tests along with the rest of unit tests
+test.dependsOn slickTest

DELETE
dd-java-agent/instrumentation/java-concurrent/slick-testing/slick-testing.gradle
-apply from: "${rootDir}/gradle/java.gradle"
-apply from: "${rootDir}/gradle/test-with-scala.gradle"
-
-apply plugin: 'org.unbroken-dome.test-sets'
-
-dependencies {
- compile project(':dd-trace-api')
- compile project(':dd-trace-ot')
-
- testCompile project(':dd-java-agent:testing')
- testCompile project(':dd-java-agent:instrumentation:java-concurrent')
- testCompile project(':dd-java-agent:instrumentation:trace-annotation')
- testCompile project(':dd-java-agent:instrumentation:jdbc')
- testCompile group: 'org.scala-lang', name: 'scala-library', version: '2.11.12'
- testCompile group: 'com.typesafe.slick', name: 'slick_2.11', version: '3.2.0'
- testCompile group: 'com.h2database', name: 'h2', version: '1.4.197'
-}

RENAME
dd-java-agent/instrumentation/java-concurrent/slick-testing/src/test/groovy/SlickTest.groovy
dd-java-agent/instrumentation/java-concurrent/src/slickTest/groovy/SlickTest.groovy
RENAME
dd-java-agent/instrumentation/java-concurrent/slick-testing/src/test/scala/SlickUtils.scala
dd-java-agent/instrumentation/java-concurrent/src/slickTest/scala/SlickUtils.scala
MODIFY
settings.gradle
settings.gradle
@@ -24,7 +24,6 @@ include ':dd-java-agent:instrumentation:jax-rs-client'
include ':dd-java-agent:instrumentation:java-concurrent'
include ':dd-java-agent:instrumentation:java-concurrent:scala-testing'
include ':dd-java-agent:instrumentation:java-concurrent:akka-testing'
-include ':dd-java-agent:instrumentation:java-concurrent:slick-testing'
include ':dd-java-agent:instrumentation:jboss-classloading'
include ':dd-java-agent:instrumentation:jdbc'
include ':dd-java-agent:instrumentation:jedis-1.4'

Use test set instead of submodule for Slick tests