Exclude tests that are Java 9 incompatible.
MODIFY
dd-java-agent-ittests/dd-java-agent-ittests.gradle
dd-java-agent-ittests/dd-java-agent-ittests.gradle
@@ -5,11 +5,11 @@ description = 'dd-java-agent-ittests'
evaluationDependsOn(':dd-java-agent:tooling')
compileTestJava.dependsOn tasks.getByPath(':dd-java-agent:tooling:testClasses')
-if (!JavaVersion.current().isJava8Compatible()) {
+if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
sourceSets {
test {
groovy {
- // These classes use Ratpack which requires Java 8.
+ // These classes use Ratpack which requires Java 8. (Currently also incompatible with Java 9.)
exclude '**/TestHttpServer.groovy', '**/ApacheHttpClientTest.groovy'
}
}

MODIFY
dd-java-agent/instrumentation/datastax-cassandra-3.2/datastax-cassandra-3.2.gradle
dd-java-agent/instrumentation/datastax-cassandra-3.2/datastax-cassandra-3.2.gradle
@@ -31,11 +31,11 @@ versionScan {
apply from: "${rootDir}/gradle/java.gradle"
-if (!JavaVersion.current().isJava8Compatible()) {
+if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
sourceSets {
test {
groovy {
- // These classes use Cassandra 3 which requires Java 8.
+ // These classes use Cassandra 3 which requires Java 8. (Currently incompatible with Java 9.)
exclude '**/CassandraClientTest.groovy'
}
}

MODIFY
dd-java-agent/instrumentation/datastax-cassandra-3.2/src/test/groovy/CassandraClientTest.groovy
dd-java-agent/instrumentation/datastax-cassandra-3.2/src/test/groovy/CassandraClientTest.groovy
@@ -9,7 +9,7 @@ import org.cassandraunit.utils.EmbeddedCassandraServerHelper
class CassandraClientTest extends AgentTestRunner {
def setupSpec() {
- EmbeddedCassandraServerHelper.startEmbeddedCassandra(40000L)
+ EmbeddedCassandraServerHelper.startEmbeddedCassandra(EmbeddedCassandraServerHelper.DEFAULT_CASSANDRA_YML_FILE, "build/tmp/embeddedCassandra")
}
def cleanupSpec() {

MODIFY
dd-java-agent/instrumentation/okhttp-3/okhttp-3.gradle
dd-java-agent/instrumentation/okhttp-3/okhttp-3.gradle
@@ -14,11 +14,11 @@ versionScan {
apply from: "${rootDir}/gradle/java.gradle"
-if (!JavaVersion.current().isJava8Compatible()) {
+if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
sourceSets {
test {
groovy {
- // These classes use Ratpack which requires Java 8.
+ // These classes use Ratpack which requires Java 8. (Currently also incompatible with Java 9.)
exclude '**/OkHttp3Test.groovy'
}
}

MODIFY
dd-java-agent/instrumentation/servlet-3/src/main/java/datadog/trace/instrumentation/servlet3/FilterChain3Instrumentation.java
dd-java-agent/instrumentation/servlet-3/src/main/java/datadog/trace/instrumentation/servlet3/FilterChain3Instrumentation.java
@@ -50,7 +50,7 @@ public final class FilterChain3Instrumentation implements Instrumenter {
"io.opentracing.contrib.web.servlet.filter.ServletFilterSpanDecorator$1",
"io.opentracing.contrib.web.servlet.filter.TracingFilter",
"io.opentracing.contrib.web.servlet.filter.TracingFilter$1",
- getClass().getName() + "$FilterChain3Advice$TagSettingAsyncListener"))
+ FilterChain3Advice.class.getName() + "$TagSettingAsyncListener"))
.transform(
DDAdvice.create()
.advice(

MODIFY
dd-java-agent/instrumentation/servlet-3/src/main/java/datadog/trace/instrumentation/servlet3/HttpServlet3Instrumentation.java
dd-java-agent/instrumentation/servlet-3/src/main/java/datadog/trace/instrumentation/servlet3/HttpServlet3Instrumentation.java
@@ -48,7 +48,7 @@ public final class HttpServlet3Instrumentation implements Instrumenter {
"io.opentracing.contrib.web.servlet.filter.ServletFilterSpanDecorator$1",
"io.opentracing.contrib.web.servlet.filter.TracingFilter",
"io.opentracing.contrib.web.servlet.filter.TracingFilter$1",
- getClass().getName() + "$HttpServlet3Advice$TagSettingAsyncListener"))
+ HttpServlet3Advice.class.getName() + "$TagSettingAsyncListener"))
.transform(
DDAdvice.create()
.advice(

MODIFY
dd-java-agent/tooling/tooling.gradle
dd-java-agent/tooling/tooling.gradle
@@ -2,6 +2,7 @@ apply from: "${rootDir}/gradle/java.gradle"
dependencies {
compile deps.bytebuddy
+ compile deps.bytebuddyagent
compile deps.slf4j
testCompile deps.opentracing

MODIFY
dd-trace-ot/dd-trace-ot.gradle
dd-trace-ot/dd-trace-ot.gradle
@@ -17,11 +17,11 @@ whitelistedInstructionClasses += whitelistedBranchClasses += [
'datadog.trace.common.sampling.PrioritySampling'
]
-if (!JavaVersion.current().isJava8Compatible()) {
+if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
sourceSets {
test {
groovy {
- // These classes use Ratpack which requires Java 8.
+ // These classes use Ratpack which requires Java 8. (Currently also incompatible with Java 9.)
exclude 'datadog/trace/api/writer/DDApiTest.groovy'
}
}

MODIFY
gradle/dependencies.gradle
gradle/dependencies.gradle
@@ -35,9 +35,9 @@ ext {
],
bytebuddy : dependencies.create(group: 'net.bytebuddy', name: 'byte-buddy', version: "${version.bytebuddy}"),
autoservice: [
- dependencies.create(group: 'com.google.auto.service', name: 'auto-service', version: '1.0-rc4'),
+ dependencies.create(group: 'com.google.auto.service', name: 'auto-service', version: '1.0-rc3'),
dependencies.create(group: 'com.google.auto', name: 'auto-common', version: '0.3'),
- dependencies.create(group: 'com.google.guava', name: 'guava', version: '19.0'),
+ dependencies.create(group: 'com.google.guava', name: 'guava', version: "${version.guava}"),
],
// Testing

Exclude tests that are Java 9 incompatible.