Commit Graph

1464 Commits

Author SHA1 Message Date
Sam Brannen 89571ea236 Introduce @SqlMergeMode for configuring @Sql annotation merging
Closes gh-1835
2019-07-21 14:34:35 +02:00
Sam Brannen ab8876219f Polish contribution
See gh-1835
2019-07-21 13:26:55 +02:00
asympro d77b715d38 Merge class-level and method-level @Sql declarations
See gh-1835
2019-07-21 13:26:48 +02:00
Sebastien Deleuze c006a83584 Upgrade to Coroutines 1.3.0-RC
This commit upgrades Coroutines support to kotlinx.coroutines
1.3.0-RC, leverages the new Coroutines BOM and refine Coroutines
detection to avoid false positives.

Only Coroutines to Mono context interoperability is supported
for now.

CLoses gh-23326
2019-07-21 11:27:43 +02:00
Juergen Hoeller cdeb1fef5f Merge branch '5.1.x' 2019-07-20 18:23:00 +02:00
Juergen Hoeller 92890232df Upgrade to OpenPDF 1.2.21, Rome 1.12.1, XStream 1.4.11.1
Includes updated javadoc links for 5.1.x branch.
2019-07-20 18:20:03 +02:00
Sebastien Deleuze 095fd5bcb3 Use Kotlin BOM
Close gh-23316
2019-07-19 10:43:54 +02:00
Sam Brannen 8db73c80e2 Polish MockRestServiceServer internals regarding "effectively final" 2019-07-18 15:45:44 +02:00
Sam Brannen 42f033e439 Polish MockMvc internals regarding "effectively final" 2019-07-18 15:45:44 +02:00
Juergen Hoeller 94e3210ae7 Fix nullability warnings and javadoc-triggered package cycles 2019-07-17 22:34:07 +02:00
Sam Brannen e92cbe1938 Improve failure messages for redirect/forward in MockMvc 2019-07-17 16:53:47 +02:00
Scheidter,Ryan 84200f3141 Treat null path as non-matching pattern in AntPathMatcher
Prior to this commit, a null path supplied to the isPattern(), match(),
and matchStart() methods in AntPathMatcher resulted in a
NullPointerException.

This commit addresses this by treating a `null` path as a non-matching
pattern.

Closes gh-23297
2019-07-17 16:53:47 +02:00
Sebastien Deleuze b4a0e71ccc Polishing
See gh-23219
2019-07-16 18:46:36 +02:00
Sam Brannen b2b79ae1e6 Polish contribution
See gh-23219
2019-07-16 14:57:32 +02:00
Sebastien Deleuze adadffe0e1 Improve charset handling in MockHttpServletResponse
This commit adds a getContentAsString(Charset fallbackCharset) method
to MockHttpServletResponse in order to make it easier to get the content
in a specific charset like UTF-8 when the response charset has not been
explicitly set (by default ISO-8859-1 is used).

JsonPathResultMatchers leverages this new feature to support UTF-8
content out of the box.

Closes gh-23219
2019-07-16 11:44:16 +02:00
Sam Brannen 0aa5533dea Execute test suite in Gradle using JUnit Platform
Closes gh-23286
2019-07-13 19:13:33 +02:00
Sam Brannen 480b1e0a0d Run JUnit 4 tests in spring-test on the JUnit Platform
This commit simplifies the build for spring-test by running JUnit 4
tests and JUnit Jupiter tests together in the standard Gradle `test`
task.

As an added bonus, the ignored tests in SpringJUnit4ConcurrencyTests
and ClassLevelDisabledSpringRuleTests are now reported in the test
results.

See gh-23286
2019-07-13 18:24:37 +02:00
Sam Brannen 3cf5db6317 Exclude ParallelExecutionSpringExtensionTests.TestCase from build
Prior to this commit, ParallelExecutionSpringExtensionTests.TestCase
was accidentally included in the build which skewed the number of tests
in spring-test by 1000.
2019-07-12 18:21:45 +02:00
Sam Brannen 09c10232a4 Polishing
See gh-23224
2019-07-12 13:08:33 +02:00
Rob Winch fde92793b5 Fix http URLs
See gh-22839
2019-07-11 18:14:20 +02:00
Sam Brannen b5fba14ab8 Fix Checkstyle violation
Eclipse apparently sorts static imports differently.
2019-07-11 18:13:59 +02:00
Sam Brannen fc38bb4fc6 Change @TestConstructor.autowire attribute into an enum
Prior to this commit, @TestConstructor supported a boolean `autowire`
attribute which naturally limited the configuration to two states: on
or off. Since we may need to support additional autowiring modes in the
future, the use of a boolean is limiting.

This commit address this issue by introducing a new AutowireMode enum
in @TestConstructor with ALL and ANNOTATED constants. In addition, the
attribute has been renamed to `autowireMode`, and the system property
has been renamed to `spring.test.constructor.autowire.mode` for greater
clarity of purpose.

Closes gh-23224
2019-07-11 18:00:52 +02:00
Arjen Poutsma 2909de8829 Remove ServerWebExchange::getParts and ServerRequest::parts
Revert to state before DefaultMultipartMessageReader
2019-07-10 16:20:20 +02:00
Sebastien Deleuze ca75c2843a Upgrade to Coroutines 1.3.0-M2 2019-07-09 11:36:26 +02:00
Sebastien Deleuze 08a5196c3a Use elementClass and elementTypeRef consistently 2019-07-08 12:08:40 +02:00
Sebastien Deleuze 2b4d6ce354 Add body methods with Object parameter to WebFlux
The commit deprecates syncBody(Object) in favor of body(Object)
which has the same behavior in ServerResponse, WebClient and
WebTestClient. It also adds body(Object, Class) and
body(Object, ParameterizedTypeReference) methods in order to support
any reactive type that can be adapted to a Publisher via
ReactiveAdapterRegistry. Related BodyInserters#fromProducer
methods are provided as well.

Shadowed Kotlin body<T>() extensions are deprecated in favor of
bodyWithType<T>() ones, including dedicated Publisher<T> and
Flow<T> variants. Coroutines extensions are adapted as well, and
body(Object) can now be used with suspending functions.

Closes gh-23212
2019-07-07 22:27:57 +02:00
Juergen Hoeller e2d01bb783 Merge branch '5.1.x' 2019-06-22 17:11:31 +02:00
Juergen Hoeller 29dcd19971 Upgrade to AspectJ 1.9.4, RxJava 2.2.10, Jetty 9.4.19, Undertow 2.0.22
Includes Hibernate Validator 6.0.17 and renames "withoutJclOverSlf4j".
2019-06-22 16:49:40 +02:00
Arjen Poutsma 92981ac9de Add Flux<Part> ServerRequest.parts()
This commit introduces Flux<Part> ServerRequest.parts() that delegates
to ServerWebExchange.getParts() and offers an alternative,
streaming way of accessing multipart data.

Closes gh-23131
2019-06-21 10:59:13 +02:00
Sam Brannen ef6471fcbf Polish contribution
See gh-23141
2019-06-18 18:59:18 +03:00
RustyTheClone 72adc3d37e Support target type in MockMvcResultMatchers.jsonPath()
This commit introduces an overloaded jsonPath() method to specify a
target type to coerce into for MockMvcResultMatchers.

 - jsonPath(String, Matcher<T>, Class<T>)

Closes gh-23141
2019-06-18 18:57:27 +03:00
Sam Brannen 89ebdc766c Polishing 2019-06-18 18:53:47 +03:00
Sam Brannen 8ceac9c015 Document supported @Transactional attributes in the TCF
This commit documents which attributes in @Transactional are supported
for test-managed transactions in the Spring TestContext Framework (TCF).

Closes gh-23149
2019-06-18 14:34:28 +03:00
Juergen Hoeller 0a77477d32 Merge branch '5.1.x' 2019-06-12 18:16:30 +02:00
Juergen Hoeller fc46abf0b7 Polishing 2019-06-12 18:04:06 +02:00
Juergen Hoeller 7e02358166 Merge branch '5.1.x' 2019-06-12 00:05:01 +02:00
Juergen Hoeller 22aba8bf60 Upgrade to Apache HttpClient 4.5.9 2019-06-11 23:49:57 +02:00
Juergen Hoeller a89bfffd8c Merge branch '5.1.x' 2019-06-11 23:16:03 +02:00
Juergen Hoeller 7dc92aa05d Polishing 2019-06-11 20:57:27 +02:00
Sam Brannen dfbf742547 Polishing 2019-06-11 13:54:11 +03:00
Sam Brannen 59d070e12a Test JUnit Jupiter 5.5 @Timeout support with Spring transactions
See gh-23076
2019-06-10 17:57:56 +03:00
Sam Brannen e903bf440b Polishing 2019-06-06 17:57:14 +03:00
Sam Brannen 61bf45c86f Merge branch '5.1.x' 2019-06-06 17:40:51 +03:00
Ilya Lukyanovich 2ed81be831 Fix MockHttpServletRequest.setCookies to produce single cookie header
Prior to this commit, MockHttpServletRequest.setCookies() produced one
Cookie header per supplied cookie, resulting in multiple Cookie headers
which violates the specification.

This commit fixes this by ensuring that all cookie name-value pairs are
stored under a single Cookie header, separated by a semicolon.

Closes gh-23074
2019-06-06 17:13:21 +03:00
Sebastien Deleuze 098ac0bbb8 Annotate Object#equals parameter with @Nullable
Closes gh-23093
2019-06-06 14:18:30 +02:00
Сергей Цыпанов aaeabc3c85 Simplify iteration over maps
Closes gh-23053
2019-05-29 18:00:34 +02:00
Sam Brannen 4b9f5a35a6 Polish contribution 2019-05-27 11:22:11 +02:00
Сергей Цыпанов 6964ed33bf Allocate objects only when it's necessary
Closes gh-23036
2019-05-27 11:14:25 +02:00
Sam Brannen 4f4427f550 Migrate TestNG assertions to AssertJ
Migrate all existing TestNG based assertions to AssertJ and add
Checkstyle rules to ensure they don't return.

See gh-23022
2019-05-26 18:29:39 +02:00
Sam Brannen 50cc23ca55 Use the JUnit Platform Test Kit in spring-test 2019-05-26 14:28:09 +02:00