Skip to content

Commit b58b54d

Browse files
committed
Limit Lettuce/Webflux versions and fix test for tomcat 9+
1 parent 51dfd2b commit b58b54d

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
5454
tomcatServer = new Tomcat()
5555
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
5656
tomcatServer.setPort(port)
57+
tomcatServer.getConnector()
5758
// comment to debug
5859
tomcatServer.setSilent(true)
5960
// this is needed in tomcat 9, this triggers the creation of a connector, will not

dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
5252
tomcatServer = new Tomcat()
5353
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
5454
tomcatServer.setPort(port)
55+
tomcatServer.getConnector()
5556
// comment to debug
5657
tomcatServer.setSilent(true)
5758
// this is needed in tomcat 9, this triggers the creation of a connector, will not

dd-java-agent/instrumentation/lettuce-5/lettuce-5.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ dependencies {
6262
testCompile group: 'com.github.kstyrc', name: 'embedded-redis', version: '0.6'
6363
testCompile group: 'io.lettuce', name: 'lettuce-core', version: '5.0.0.RELEASE'
6464

65-
latestDepTestCompile group: 'io.lettuce', name: 'lettuce-core', version: '+'
65+
// FIXME: Tests need to be updated to support 5.1+
66+
latestDepTestCompile group: 'io.lettuce', name: 'lettuce-core', version: '5.0.+'
6667
}

dd-java-agent/instrumentation/servlet-3/src/test/groovy/TomcatServlet3Test.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class TomcatServlet3Test extends AgentTestRunner {
2727
port = TestUtils.randomOpenPort()
2828
tomcatServer = new Tomcat()
2929
tomcatServer.setPort(port)
30+
tomcatServer.getConnector()
3031

3132
def baseDir = Files.createTempDir()
3233
baseDir.deleteOnExit()

dd-java-agent/instrumentation/spring-webflux/spring-webflux.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ dependencies {
7575
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.0.0.RELEASE'
7676
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '2.0.0.RELEASE'
7777

78-
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '+'
79-
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '+'
80-
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '+'
78+
// FIXME: Tests need to be updated to support 2.1+
79+
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '2.0.+'
80+
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.0.+'
81+
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '2.0.+'
8182
}

dd-java-agent/instrumentation/spring-webflux/src/test/groovy/SpringWebfluxTest.groovy

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import okhttp3.RequestBody
1313
import org.springframework.boot.test.context.SpringBootTest
1414
import org.springframework.boot.web.server.LocalServerPort
1515
import org.springframework.web.server.ResponseStatusException
16-
import spock.lang.Unroll
1716

1817
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SpringWebFluxTestApplication)
1918
class SpringWebfluxTest extends AgentTestRunner {
@@ -27,7 +26,6 @@ class SpringWebfluxTest extends AgentTestRunner {
2726

2827
OkHttpClient client = OkHttpUtils.client()
2928

30-
@Unroll
3129
def "Basic GET test #testName to functional API"() {
3230
setup:
3331
String url = "http://localhost:$port/greet$urlSuffix"
@@ -82,7 +80,6 @@ class SpringWebfluxTest extends AgentTestRunner {
8280
"with two parameters" | "/World/Test1" | "/{name}/{word}" | SpringWebFluxTestApplication.GreetingHandler.DEFAULT_RESPONSE + " World Test1"
8381
}
8482

85-
@Unroll
8683
def "Basic GET test #testName to annotations API"() {
8784
setup:
8885
String url = "http://localhost:$port/foo$urlSuffix"
@@ -417,7 +414,6 @@ class SpringWebfluxTest extends AgentTestRunner {
417414
}
418415
}
419416

420-
@Unroll
421417
def "Flux x#count GET test with functional API endpoint"() {
422418
setup:
423419
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))
@@ -471,7 +467,6 @@ class SpringWebfluxTest extends AgentTestRunner {
471467
count << [0, 1, 10]
472468
}
473469

474-
@Unroll
475470
def "Flux x#count GET test with spring annotations endpoint"() {
476471
setup:
477472
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))

0 commit comments

Comments
 (0)