Commit Graph

1300 Commits

Author SHA1 Message Date
Juergen Hoeller e9626779ee @Resource provides dependency descriptor for resolving beans by name
Closes gh-22359
2019-02-07 15:56:00 +01:00
Juergen Hoeller 165d2511b9 Upgrade to Apache HttpClient 4.5.7 and Commons FileUpload 1.4
Includes RxJava 2.2.6, Netty 4.1.33, Undertow 2.0.17.
2019-02-05 00:46:07 +01:00
Juergen Hoeller 493e9c1ff0 Consistent upgrade to Rome 1.12 and WebJars Locator 0.36 2019-01-24 15:18:43 +01:00
Juergen Hoeller d37a18ff03 Upgrade to Hibernate Validator 6.0.14 and Apache Johnzon 1.1.11
Includes OkHttp MockWebServer 3.12.1.
2019-01-08 00:50:44 +01:00
Juergen Hoeller 7a7958f275 MockMvcResultMatchers.forwardedUrl argument declared as nullable
Issue: SPR-17623
2018-12-25 13:20:09 +01:00
Rossen Stoyanchev 38ae282c3b Update log category precision for all tests
Replace the full category capped at 36 chars with the class name only
and 1 char per package, e.g. org.apache.commons.Foo -> o.a.c.Foo
2018-12-12 11:40:33 -05:00
Rossen Stoyanchev 270099383b Add protected method in StandaloneMockMvcBuilder
To allow sub-classes to register additional MVC infrastructure.

Issue: SPR-17520
2018-12-12 11:40:33 -05:00
Juergen Hoeller 9efea7eb73 MockHttpServletRequest preserves original Accept-Language header value
Issue: SPR-17566
2018-12-04 22:07:43 +01:00
Juergen Hoeller d5dab12909 NettyDataBufferFactory.join returns single-element buffer as-is
Issue: SPR-17560
2018-12-03 23:52:35 +01:00
Sam Brannen 58cde3c2e6 Avoid test compile-time dependency on junit-jupiter-engine
Issue: SPR-17533
2018-11-23 18:05:34 +01:00
Sam Brannen aa7f69a5d1 Ensure that parameter resolution in SpringExtension is thread-safe
Prior to this commit, parallel execution of @BeforeEach and @AfterEach
methods that accepted @Autowired arguments would fail intermittently
due to a race condition in the internal implementation of the JDK's
java.lang.reflect.Executable.getParameters() method.

This commit addresses this issue by creating instances of
SynthesizingMethodParameter via
SynthesizingMethodParameter.forExecutable(Executable, int) instead of
SynthesizingMethodParameter.forParameter(Parameter), since the latter
looks up the parameter index by iterating over the array returned by
Executable.getParameters() (which is not thread-safe).

Issue: SPR-17533
2018-11-23 16:35:19 +01:00
Juergen Hoeller c16f36b537 Upgrade to Mockito 2.23.4, Selenium 3.141.59, JSON-P 1.1.4 2018-11-22 18:24:18 +01:00
Juergen Hoeller ae8f680d2e Polishing 2018-11-22 18:21:56 +01:00
Rossen Stoyanchev 759013eb17 Consistent isEmpty check in WebTestClient
Issue: SPR-17522
2018-11-20 23:02:53 -05:00
Juergen Hoeller 8c7579eba8 Polishing 2018-11-20 22:06:44 +01:00
Juergen Hoeller ce5c65c0b0 Upgrade to JAXB 2.3.1, Groovy 2.5.4, Jetty 9.4.14, Tomcat 9.0.13
Includes JAX-WS 2.3.1, Awaitility 3.1.3, OkHttp 3.12, Woodstox 5.2.
2018-11-19 12:41:26 +01:00
Stephane Nicoll 7b6f2f8fb3 Polish contribution
Closes gh-2019
2018-11-19 08:45:33 +01:00
Hanope bfb49c7249 Fix typos
See gh-2019
2018-11-19 08:41:21 +01:00
Sam Brannen b3aad549c9 Fix @since tag 2018-11-10 16:56:39 +01:00
Sam Brannen 865f1f692a Introduce tests for @Sql and @Transactional support in @Nested test classes
This commit was inspired by the following question on Stack Overflow.

https://stackoverflow.com/questions/53236807/spring-boot-testing-run-script-in-a-nested-test-sql-script-sql
2018-11-10 15:47:30 +01:00
Sam Brannen 93df24af16 Polishing 2018-11-10 15:47:29 +01:00
Juergen Hoeller f65408f646 Avoid references to groovy-all artifact across all modules
Issue: SPR-17446
2018-11-05 12:27:07 +01:00
Rossen Stoyanchev c2b55e60cd Fix failing test
After the fix #658c7f for lenient parsing of dates, the error message
raised uses an HttpHeaders-formatted date. As a result the test
verifying the error message fails in the beginning of the month between
1-9 because it's formatted slightly differently.
2018-11-01 15:27:39 -04:00
Sam Brannen 42a95b8f35 Fix typo and polish 2018-10-29 14:47:20 +01:00
Juergen Hoeller 67bd3f670f Upgrade to AspectJ 1.9.2, Rome 1.11.1, OpenPDF 1.2.5, POI 4.0 2018-10-25 15:15:47 +02:00
Juergen Hoeller a0b42a3dfd Upgrade to Hibernate ORM 5.3.7 2018-10-18 18:05:26 +02:00
Juergen Hoeller 93bb78ec23 Avoid private bean classes in integration tests (for CGLIB on JDK 11)
Issue: SPR-16391
2018-10-15 12:26:38 +02:00
Juergen Hoeller 50949415d7 Upgrade spring-test to Hibernate ORM 5.3.6 (for JDK 11 compatibility)
Issue: SPR-16391
2018-10-15 00:39:25 +02:00
Rossen Stoyanchev ecd0d7f0f6 Complete initialization with bindToRouterFunction
Issue: SPR-17239
2018-10-12 17:11:35 -04:00
Rossen Stoyanchev 658c7f99d7 Lenient date parsing in HeadersResultMatchers
Rather than formatting the expected value, and be susceptible to
minor formatting differences (e.g. 01 vs 1 for day of month), parse the
actual header value leniently with HttpHeaders and compare time values.

Issue: SPR-17330
2018-10-12 15:41:42 -04:00
Rossen Stoyanchev c5ca56bd50 Polish 2018-10-12 12:15:45 -04:00
Juergen Hoeller bfc5ad890e MockHttpServletRequest resets InputStream/Reader on setContent
Issue: SPR-17373
2018-10-12 16:00:31 +02:00
Juergen Hoeller 0b2c482e29 Upgrade to Selenium HtmlUnit Driver 2.33 2018-10-12 13:17:14 +02:00
Rossen Stoyanchev 8df0bc88d2 Improve access to raw content in WebTestClient
If the content has not been consumed, cause it to be produced, and
wait for a certain amount of time before giving up, so the raw content
can be made available. This can occur when:

1) In a mock server scenario the Flux representing the client request
content is passed directly to the mock server request, but is never
consumed because of an error before the body is read.

2) Test obtains FluxExchangeResult (e.g. for streaming) but instead of
consuming the Flux, it calls getResponseBodyContent() instead.

Issue: SPR-17363
2018-10-11 20:25:56 -04:00
Rossen Stoyanchev c567e65eea WritetapConnector internal refactoring
Extract a common delegate class to share between the request and the
to wiretap a Publisher and record and buffer its data.

Preparation for SPR-17363.
2018-10-11 19:47:37 -04:00
Rossen Stoyanchev 050f44d75b Rename WebTestClientConnectorTests to match class name 2018-10-11 19:47:37 -04:00
Juergen Hoeller efdbddd358 Full alignment of spring-test vs spring-web MockCookie variants
Issue: SPR-17321
2018-10-09 23:13:18 +02:00
Rossen Stoyanchev 29ff8a8d12 More defensive check for MockAsyncContext
Avoid automatically unwrapping the request in TestDispatcherServlet,
if we find the MockAsyncContext.

Issue: SPR-17353
2018-10-09 11:56:47 -04:00
Rossen Stoyanchev 1489457025 Restore calls to setLocale in MockHttpServletResponse
Issue: SPR-17284
2018-10-05 13:50:41 -04:00
Sam Brannen e63bffcfa0 Introduce not-null precondition for MockCookie parsing 2018-10-02 13:07:20 +02:00
Sam Brannen 77205ca165 Polish MockCookie contribution
Issue: SPR-17321, #1974
2018-10-02 13:06:16 +02:00
Sam Brannen 31095f1d4e Move MockCookie parsing tests to correct class
Issue: SPR-17321, #1974
2018-10-02 12:43:17 +02:00
Sam Brannen 49bc746640 Polish MockCookie[Tests] 2018-10-02 12:41:07 +02:00
Michael Bell 1b8421c7fe Fix MockCookie parsing when attribute is omitted
Issue: SPR-17321, #1974
2018-10-02 06:18:45 -04:00
Juergen Hoeller 255015fc6b Prepared for backport to 4.3.20 and 5.0.10
Issue: SPR-17295
2018-09-29 17:08:57 +02:00
Juergen Hoeller a76b8deda5 Consistent copyright header and fine-tuned javadoc in test/web mocks
Issue: SPR-17295
2018-09-24 00:27:50 +02:00
Juergen Hoeller 51ba322947 MockHttpServletRequest allows for removing registered header values
Includes full alignment of spring-test vs spring-web mock variants.

Issue: SPR-17295
2018-09-23 14:44:15 +02:00
Juergen Hoeller 80e52de231 Upgrade to HtmlUnit 2.33 and Apache Johnzon 1.1.10 2018-09-20 11:55:50 +02:00
Juergen Hoeller cbc0fad961 Upgrade to Kotlin 1.2.70
Includes Hibernate ORM 5.1.16 and Hibernate Validator 6.0.13.
2018-09-13 18:23:42 +02:00
Juergen Hoeller e49896d95f Upgrade to Mockito 2.22, XMLUnit 2.6.2, JavaMail 1.6.2
Also includes Apache Johnzon 1.1.9.
2018-09-10 10:52:24 +02:00