Set minimum version and fix var name.
MODIFY
dd-java-agent/instrumentation/mongo/driver-3.1/driver-3.1.gradle
dd-java-agent/instrumentation/mongo/driver-3.1/driver-3.1.gradle
@@ -29,7 +29,7 @@ dependencies {
testCompile project(':dd-java-agent:testing')
testCompile project(':dd-java-agent:instrumentation:mongo').sourceSets.test.output
- testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '2.2.0'
+ testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '1.50.5'
testCompile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.1.0'
latestDepTestCompile group: 'org.mongodb', name: 'mongo-java-driver', version: '+'

MODIFY
dd-java-agent/instrumentation/mongo/driver-async-3.3/driver-async-3.3.gradle
dd-java-agent/instrumentation/mongo/driver-async-3.3/driver-async-3.3.gradle
+// Set properties before any plugins get loaded
+ext {
+ // Since we're using CompletableFutures in the test...
+ minJavaVersionForTests = JavaVersion.VERSION_1_8
+}
+
muzzle {
pass {
group = "org.mongodb"
@@ -34,7 +40,7 @@ dependencies {
testCompile project(':dd-java-agent:testing')
testCompile project(':dd-java-agent:instrumentation:mongo').sourceSets.test.output
- testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '2.2.0'
+ testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '1.50.5'
testCompile group: 'org.mongodb', name: 'mongodb-driver-async', version: '3.3.0'
latestDepTestCompile group: 'org.mongodb', name: 'mongodb-driver-async', version: '+'

MODIFY
dd-java-agent/instrumentation/mongo/mongo.gradle
dd-java-agent/instrumentation/mongo/mongo.gradle
@@ -5,7 +5,7 @@ dependencies {
testImplementation deps.autoservice
testCompile project(':dd-java-agent:testing')
- testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '2.2.0'
+ testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '1.50.5'
}
// Forcing strict test execution order (no parallel execution) to ensure proper mongo executable initialization.

MODIFY
dd-java-agent/instrumentation/mongo/src/test/groovy/MongoBaseTest.groovy
dd-java-agent/instrumentation/mongo/src/test/groovy/MongoBaseTest.groovy
@@ -17,7 +17,7 @@ import spock.lang.Shared
*/
class MongoBaseTest extends AgentTestRunner {
// https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo#executable-collision
- private static final MongodStarter starter = MongodStarter.getDefaultInstance()
+ private static final MongodStarter STARTER = MongodStarter.getDefaultInstance()
@Shared
int port = PortUtils.randomOpenPort()
@@ -33,7 +33,7 @@ class MongoBaseTest extends AgentTestRunner {
.net(new Net("localhost", port, Network.localhostIsIPv6()))
.build()
- mongodExe = starter.prepare(mongodConfig)
+ mongodExe = STARTER.prepare(mongodConfig)
mongod = mongodExe.start()
}

Set minimum version and fix var name.