Limit Lettuce/Webflux versions and fix test for tomcat 9+
This commit is contained in:
parent
51dfd2b184
commit
b58b54dab9
|
@ -54,6 +54,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
||||||
tomcatServer = new Tomcat()
|
tomcatServer = new Tomcat()
|
||||||
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
|
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
|
||||||
tomcatServer.setPort(port)
|
tomcatServer.setPort(port)
|
||||||
|
tomcatServer.getConnector()
|
||||||
// comment to debug
|
// comment to debug
|
||||||
tomcatServer.setSilent(true)
|
tomcatServer.setSilent(true)
|
||||||
// this is needed in tomcat 9, this triggers the creation of a connector, will not
|
// this is needed in tomcat 9, this triggers the creation of a connector, will not
|
||||||
|
|
|
@ -52,6 +52,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
||||||
tomcatServer = new Tomcat()
|
tomcatServer = new Tomcat()
|
||||||
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
|
tomcatServer.setBaseDir(baseDir.getAbsolutePath())
|
||||||
tomcatServer.setPort(port)
|
tomcatServer.setPort(port)
|
||||||
|
tomcatServer.getConnector()
|
||||||
// comment to debug
|
// comment to debug
|
||||||
tomcatServer.setSilent(true)
|
tomcatServer.setSilent(true)
|
||||||
// this is needed in tomcat 9, this triggers the creation of a connector, will not
|
// this is needed in tomcat 9, this triggers the creation of a connector, will not
|
||||||
|
|
|
@ -62,5 +62,6 @@ dependencies {
|
||||||
testCompile group: 'com.github.kstyrc', name: 'embedded-redis', version: '0.6'
|
testCompile group: 'com.github.kstyrc', name: 'embedded-redis', version: '0.6'
|
||||||
testCompile group: 'io.lettuce', name: 'lettuce-core', version: '5.0.0.RELEASE'
|
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.+'
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ class TomcatServlet3Test extends AgentTestRunner {
|
||||||
port = TestUtils.randomOpenPort()
|
port = TestUtils.randomOpenPort()
|
||||||
tomcatServer = new Tomcat()
|
tomcatServer = new Tomcat()
|
||||||
tomcatServer.setPort(port)
|
tomcatServer.setPort(port)
|
||||||
|
tomcatServer.getConnector()
|
||||||
|
|
||||||
def baseDir = Files.createTempDir()
|
def baseDir = Files.createTempDir()
|
||||||
baseDir.deleteOnExit()
|
baseDir.deleteOnExit()
|
||||||
|
|
|
@ -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-test', version: '2.0.0.RELEASE'
|
||||||
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', 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: '+'
|
// FIXME: Tests need to be updated to support 2.1+
|
||||||
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '+'
|
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '2.0.+'
|
||||||
latestDepTestCompile group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: '+'
|
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.+'
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import okhttp3.RequestBody
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
import org.springframework.boot.test.context.SpringBootTest
|
||||||
import org.springframework.boot.web.server.LocalServerPort
|
import org.springframework.boot.web.server.LocalServerPort
|
||||||
import org.springframework.web.server.ResponseStatusException
|
import org.springframework.web.server.ResponseStatusException
|
||||||
import spock.lang.Unroll
|
|
||||||
|
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SpringWebFluxTestApplication)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SpringWebFluxTestApplication)
|
||||||
class SpringWebfluxTest extends AgentTestRunner {
|
class SpringWebfluxTest extends AgentTestRunner {
|
||||||
|
@ -27,7 +26,6 @@ class SpringWebfluxTest extends AgentTestRunner {
|
||||||
|
|
||||||
OkHttpClient client = OkHttpUtils.client()
|
OkHttpClient client = OkHttpUtils.client()
|
||||||
|
|
||||||
@Unroll
|
|
||||||
def "Basic GET test #testName to functional API"() {
|
def "Basic GET test #testName to functional API"() {
|
||||||
setup:
|
setup:
|
||||||
String url = "http://localhost:$port/greet$urlSuffix"
|
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"
|
"with two parameters" | "/World/Test1" | "/{name}/{word}" | SpringWebFluxTestApplication.GreetingHandler.DEFAULT_RESPONSE + " World Test1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@Unroll
|
|
||||||
def "Basic GET test #testName to annotations API"() {
|
def "Basic GET test #testName to annotations API"() {
|
||||||
setup:
|
setup:
|
||||||
String url = "http://localhost:$port/foo$urlSuffix"
|
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"() {
|
def "Flux x#count GET test with functional API endpoint"() {
|
||||||
setup:
|
setup:
|
||||||
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))
|
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))
|
||||||
|
@ -471,7 +467,6 @@ class SpringWebfluxTest extends AgentTestRunner {
|
||||||
count << [0, 1, 10]
|
count << [0, 1, 10]
|
||||||
}
|
}
|
||||||
|
|
||||||
@Unroll
|
|
||||||
def "Flux x#count GET test with spring annotations endpoint"() {
|
def "Flux x#count GET test with spring annotations endpoint"() {
|
||||||
setup:
|
setup:
|
||||||
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))
|
String expectedResponseBodyStr = FooModel.createXFooModelsStringFromArray(FooModel.createXFooModels(count))
|
||||||
|
|
Loading…
Reference in New Issue