mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-05-02 20:09:31 +01:00
08e6d762d2
Prior to this commit, `RestTestClient` tests could only perform expectations on the response without consuming the body. In this case, the client could leak HTTP connections with the underlying HTTP library because the response was not entirely read. This commit ensures that the response is always fully drained before performing expectations. The client is configured to buffer the response content, so further body expectations are always possible. Fixes gh-35784
120 lines
5.3 KiB
Groovy
120 lines
5.3 KiB
Groovy
description = "Spring TestContext Framework"
|
|
|
|
apply plugin: "kotlin"
|
|
|
|
dependencies {
|
|
api(project(":spring-core"))
|
|
compileOnly("com.google.code.findbugs:jsr305") // for Reactor
|
|
optional(project(":spring-aop"))
|
|
optional(project(":spring-beans"))
|
|
optional(project(":spring-context"))
|
|
optional(project(":spring-jdbc"))
|
|
optional(project(":spring-orm"))
|
|
optional(project(":spring-tx"))
|
|
optional(project(":spring-web"))
|
|
optional(project(":spring-webflux"))
|
|
optional(project(":spring-webmvc"))
|
|
optional(project(":spring-websocket"))
|
|
optional("com.jayway.jsonpath:json-path")
|
|
optional("io.micrometer:context-propagation")
|
|
optional("io.micrometer:micrometer-observation")
|
|
optional("io.projectreactor:reactor-test")
|
|
optional("jakarta.activation:jakarta.activation-api")
|
|
optional("jakarta.el:jakarta.el-api")
|
|
optional("jakarta.inject:jakarta.inject-api")
|
|
optional("jakarta.servlet:jakarta.servlet-api")
|
|
optional("jakarta.servlet.jsp:jakarta.servlet.jsp-api")
|
|
optional("jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api")
|
|
optional("jakarta.websocket:jakarta.websocket-api")
|
|
optional("jakarta.websocket:jakarta.websocket-client-api")
|
|
optional("jakarta.xml.bind:jakarta.xml.bind-api")
|
|
optional("junit:junit")
|
|
optional("org.apache.groovy:groovy")
|
|
optional("org.apache.tomcat.embed:tomcat-embed-core")
|
|
optional("org.aspectj:aspectjweaver")
|
|
optional("org.assertj:assertj-core")
|
|
optional("org.hamcrest:hamcrest")
|
|
optional("org.htmlunit:htmlunit") {
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
}
|
|
optional("org.jetbrains.kotlin:kotlin-reflect")
|
|
optional("org.jetbrains.kotlin:kotlin-stdlib")
|
|
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
|
|
optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
|
|
optional("org.junit.jupiter:junit-jupiter-api")
|
|
optional("org.junit.platform:junit-platform-launcher") // for AOT processing
|
|
optional("org.mockito:mockito-core")
|
|
optional("org.seleniumhq.selenium:htmlunit3-driver") {
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
exclude group: "net.bytebuddy", module: "byte-buddy"
|
|
}
|
|
optional("org.seleniumhq.selenium:selenium-java") {
|
|
exclude group: "net.bytebuddy", module: "byte-buddy"
|
|
}
|
|
optional("org.skyscreamer:jsonassert")
|
|
optional("org.testng:testng")
|
|
optional("org.xmlunit:xmlunit-matchers")
|
|
testImplementation(project(":spring-context-support"))
|
|
testImplementation(project(":spring-core-test"))
|
|
testImplementation(project(":spring-oxm"))
|
|
testImplementation(testFixtures(project(":spring-beans")))
|
|
testImplementation(testFixtures(project(":spring-context")))
|
|
testImplementation(testFixtures(project(":spring-core")))
|
|
testImplementation(testFixtures(project(":spring-tx")))
|
|
testImplementation(testFixtures(project(":spring-web")))
|
|
testImplementation("com.fasterxml.jackson.core:jackson-databind")
|
|
testImplementation("com.rometools:rome")
|
|
testImplementation("com.squareup.okhttp3:mockwebserver3")
|
|
testImplementation("com.thoughtworks.xstream:xstream")
|
|
testImplementation("de.bechte.junit:junit-hierarchicalcontextrunner")
|
|
testImplementation("io.projectreactor.netty:reactor-netty-http")
|
|
testImplementation("jakarta.annotation:jakarta.annotation-api")
|
|
testImplementation("jakarta.ejb:jakarta.ejb-api")
|
|
testImplementation("jakarta.interceptor:jakarta.interceptor-api")
|
|
testImplementation("jakarta.mail:jakarta.mail-api")
|
|
testImplementation("jakarta.validation:jakarta.validation-api")
|
|
testImplementation("javax.cache:cache-api")
|
|
testImplementation("org.apache.httpcomponents.client5:httpclient5")
|
|
testImplementation("org.awaitility:awaitility")
|
|
testImplementation("org.easymock:easymock")
|
|
testImplementation("org.eclipse.jetty:jetty-reactive-httpclient")
|
|
testImplementation("org.hibernate.orm:hibernate-core")
|
|
testImplementation("org.hibernate.validator:hibernate-validator")
|
|
testImplementation("org.hsqldb:hsqldb")
|
|
testImplementation("org.junit.platform:junit-platform-testkit")
|
|
testImplementation("tools.jackson.core:jackson-databind")
|
|
testRuntimeOnly("com.sun.xml.bind:jaxb-core")
|
|
testRuntimeOnly("com.sun.xml.bind:jaxb-impl")
|
|
testRuntimeOnly("org.glassfish:jakarta.el")
|
|
testRuntimeOnly("org.junit.support:testng-engine")
|
|
testRuntimeOnly("org.junit.vintage:junit-vintage-engine") {
|
|
exclude group: "junit", module: "junit"
|
|
}
|
|
testRuntimeOnly("org.yaml:snakeyaml")
|
|
}
|
|
|
|
// Prevent xml-apis from being used so that the corresponding XML APIs from
|
|
// the JDK's `java.xml` module are used instead. This allows spring-test to
|
|
// build in Eclipse IDE which fails to compile if there is a split package
|
|
// between a JDK system module and the unnamed module (for JARs on the
|
|
// classpath).
|
|
configurations.optional {
|
|
exclude group: "xml-apis", module: "xml-apis"
|
|
}
|
|
|
|
test {
|
|
description = "Runs JUnit 4, JUnit Jupiter, and TestNG tests."
|
|
useJUnitPlatform {
|
|
includeEngines "junit-vintage", "junit-jupiter", "testng"
|
|
}
|
|
// `include` test filters and system properties are configured in
|
|
// org.springframework.build.TestConventions in buildSrc.
|
|
filter.excludeTestsMatching("*TestCase")
|
|
// Since spring-test relies on the Vintage test engine for JUnit 4 support,
|
|
// we disable reporting of the "deprecated" discovery issue, because that
|
|
// would otherwise fail the build.
|
|
systemProperty("junit.vintage.discovery.issue.reporting.enabled", "false")
|
|
// Optionally configure Java Util Logging for the JUnit Platform.
|
|
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
|
|
}
|