Limit Lettuce/Webflux versions and fix test for tomcat 9+
MODIFY
dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy
dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy
@@ -54,6 +54,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
tomcatServer = new Tomcat()
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
tomcatServer.setPort(port)
+ tomcatServer.getConnector()
// comment to debug
tomcatServer.setSilent(true)
// this is needed in tomcat 9, this triggers the creation of a connector, will not

MODIFY
dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy
dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy
@@ -52,6 +52,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
tomcatServer = new Tomcat()
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
tomcatServer.setPort(port)
+ tomcatServer.getConnector()
// comment to debug
tomcatServer.setSilent(true)
// this is needed in tomcat 9, this triggers the creation of a connector, will not

MODIFY
dd-java-agent/instrumentation/lettuce-5/lettuce-5.gradle
dd-java-agent/instrumentation/lettuce-5/lettuce-5.gradle
@@ -62,5 +62,6 @@ dependencies {
testCompile group: 'com.github.kstyrc', name: 'embedded-redis', version: '0.6'
testCompile group: 'io.lettuce', name: 'lettuce-core', version: '5.0.0.RELEASE'
- latestDepTestCompile group: 'io.lettuce', name: 'lettuce-core', version: '+'
+ // FIXME: Tests need to be updated to support 5.1+
+ latestDepTestCompile group: 'io.lettuce', name: 'lettuce-core', version: '5.0.+'
}

MODIFY
dd-java-agent/instrumentation/servlet-3/src/test/groovy/TomcatServlet3Test.groovy
dd-java-agent/instrumentation/servlet-3/src/test/groovy/TomcatServlet3Test.groovy
@@ -27,6 +27,7 @@ class TomcatServlet3Test extends AgentTestRunner {
port = TestUtils.randomOpenPort()
tomcatServer = new Tomcat()
tomcatServer.setPort(port)
+ tomcatServer.getConnector()
def baseDir = Files.createTempDir()
baseDir.deleteOnExit()

MODIFY
dd-java-agent/instrumentation/spring-webflux/spring-webflux.gradle
dd-java-agent/instrumentation/spring-webflux/spring-webflux.gradle
@@ -75,7 +75,8 @@ dependencies {
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.0.0.RELEASE'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '2.0.0.RELEASE'
- latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '+'
- latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '+'
- latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '+'
+ // FIXME: Tests need to be updated to support 2.1+
+ latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '2.0.+'
+ latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.0.+'
+ latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '2.0.+'
}

MODIFY
dd-java-agent/instrumentation/spring-webflux/src/test/groovy/SpringWebfluxTest.groovy
dd-java-agent/instrumentation/spring-webflux/src/test/groovy/SpringWebfluxTest.groovy
@@ -13,7 +13,6 @@ import okhttp3.RequestBody
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.web.server.LocalServerPort
import org.springframework.web.server.ResponseStatusException
-import spock.lang.Unroll
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SpringWebFluxTestApplication)
class SpringWebfluxTest extends AgentTestRunner {
@@ -27,7 +26,6 @@ class SpringWebfluxTest extends AgentTestRunner {
OkHttpClient client = OkHttpUtils.client()
- @Unroll
def "Basic GET test #testName to functional API"() {
setup:
String url = "http://localhost:$port/greet$urlSuffix"
@@ -82,7 +80,6 @@ class SpringWebfluxTest extends AgentTestRunner {
"with two parameters" | "/World/Test1" | "/{name}/{word}" | SpringWebFluxTestApplication.GreetingHandler.DEFAULT_RESPONSE + " World Test1"
}
- @Unroll
def "Basic GET test #testName to annotations API"() {
setup:
String url = "http://localhost:$port/foo$urlSuffix"
@@ -417,7 +414,6 @@ class SpringWebfluxTest extends AgentTestRunner {
}
}
- @Unroll
def "Flux x#count GET test with functional API endpoint"() {
setup:
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))
@@ -471,7 +467,6 @@ class SpringWebfluxTest extends AgentTestRunner {
count << [0, 1, 10]
}
- @Unroll
def "Flux x#count GET test with spring annotations endpoint"() {
setup:
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))

Limit Lettuce/Webflux versions and fix test for tomcat 9+