Commit Graph

773 Commits

Author SHA1 Message Date
Sam Brannen
8748ba4c4b Suppress warning in SpringFailOnTimeoutTests 2018-04-14 16:46:57 +02:00
Sam Brannen
fecbcd4e93 Expand scope of SpringFailOnTimeoutTests
Issue: SPR-16716
2018-04-12 10:58:21 +02:00
Igor Suhorukov
59396e1a6f Throw exception from user code in SpringFailOnTimeout even if a timeout occurs
Issue: SPR-16717
2018-04-12 10:58:21 +02:00
Rossen Stoyanchev
6deee3e818 TestDispatcherServlet unwraps to find mock request
Issue: SPR-16695
2018-04-06 11:21:25 -04:00
Juergen Hoeller
49eafe4261 Polishing 2018-03-31 19:54:12 +02:00
Juergen Hoeller
b0ed385f84 Polishing 2018-03-31 17:06:33 +02:00
Juergen Hoeller
5d54adfb9a Selective backport of annotation retrieval refinements (from 5.0.5)
In particular AnnotationTypeFilter's ignoring of standard Java interfaces, AnnotationUtils.clearCache() and a few extra common classes in ClassUtils.

Issue: SPR-16667
Issue: SPR-16675
2018-03-31 17:03:59 +02:00
Rossen Stoyanchev
6e4bbac6f7 MvcResult returns asyncResult after asyncDispatch
Issue: SPR-16648
2018-03-28 22:27:30 -04:00
Juergen Hoeller
9cc03fa8b0 Polishing 2018-03-28 02:03:31 +02:00
Sam Brannen
d57d914b26 Make method params final for use in anonymous inner class
Issue: SPR-16587
2018-03-13 17:10:54 +01:00
Sam Brannen
68463e2018 Support target type in JsonPath assertions for MockMvc results
This commit picks up where SPR-14498 left off by adding support for an
explicit target type when using JsonPath to perform an assertion against
the response content using a Hamcrest Matcher.

Specifically, there is a new overloaded value(Matcher<T>, Class<T>)
method in JsonPathResultMatchers for use with Hamcrest matchers where
the target type (i.e., Class<T>) can be specified.

Issue: SPR-16587
2018-03-13 16:06:39 +01:00
Yannik Hampe
ff53a26333 Make MockRestRequestMatchers independent of JUnit (#1720)
MockRestRequestMatchers was using org.junit.Assert.assertNotNull
and thus could not be used in projects that use e.g. TestNG instead
of JUnit 4.
2018-03-08 13:37:26 +01:00
Juergen Hoeller
bd6b7b08f3 Concurrency and exception message refinements for test transactions
(cherry picked from commit a0cc800)
2018-03-05 13:40:13 +01:00
Juergen Hoeller
1f12214b45 Polishing 2018-03-02 13:11:31 +01:00
Juergen Hoeller
8e68ac44d2 Polishing 2018-03-01 01:12:30 +01:00
Juergen Hoeller
073e78b68d Polishing 2018-02-25 15:04:19 +01:00
igor-suhorukov
d5f358c33c Polish: Array designators "[]" should be on the type, not the variable
(cherry picked from commit c782075)
2018-02-25 15:03:54 +01:00
Juergen Hoeller
295df21f06 Polishing 2018-02-25 00:48:00 +01:00
Juergen Hoeller
8b071633d3 Consistent use of ClassUtils.toClassArray (and related polishing) 2018-02-22 14:27:57 +01:00
Juergen Hoeller
87abdb92da Polishing 2018-02-16 21:02:00 +01:00
Juergen Hoeller
6d11b40353 Consistent use of StringUtils.toStringArray 2018-02-16 19:48:43 +01:00
Juergen Hoeller
722cb36e01 Consistent Class array vs vararg declarations (and related polishing)
(cherry picked from commit 3b810f3)
2018-02-14 16:38:28 +01:00
Juergen Hoeller
afe461609c Polishing (selective backports from master) 2018-02-12 13:45:53 +01:00
Juergen Hoeller
33d655a634 Consistent handling of InterruptedException (plus setSchedulerFactory)
Issue: SPR-16479
Issue: SPR-16439

(cherry picked from commit 39201ad)
2018-02-12 13:44:54 +01:00
Rossen Stoyanchev
fe4472dbeb MockHttpServletRequestBuilder decodes pathInfo
Previously MockHttpServletRequestBuilder calculated the pathInfo from the
provided URL without decoding the value. This meant that the pathInfo
incorrectly included URL encoded values.

Now MockHttpServletRequestBuilder properly decodes the pathInfo.

Backport of #0cd427bdd35e668dda6332ae2885d94c222d9c49.

Fixes: SPR-16453
2018-02-02 15:17:58 -05:00
Juergen Hoeller
4ccf33e36b Javadoc format and related polishing
(cherry picked from commit 9d0e62e)
2018-01-22 13:08:03 +01:00
Juergen Hoeller
19640ec3f9 Log non-loadable TestExecutionListener classes at debug level only
Issue: SPR-16369
2018-01-19 19:10:31 +01:00
Rossen Stoyanchev
d62dd2dd8d Polish MockRestServiceServer code
Cherry picked from #7ab4d0ca08
2018-01-17 13:04:32 -05:00
Rossen Stoyanchev
0a30b71dc3 Fix failing tests caused by previous commit 2018-01-12 12:36:24 -05:00
Rossen Stoyanchev
03118542f4 MockHttpInputMessage respects getBody contract
Issue: SPR-16367
2018-01-12 11:44:42 -05:00
Juergen Hoeller
f09e252417 Polishing 2017-11-21 15:25:33 +01:00
Juergen Hoeller
a88c47a120 Properly handle follow-up request after failure
Issue: SPR-16132
2017-11-14 12:30:04 +01:00
Juergen Hoeller
dc0a934c99 MockHttpServletResponse.getDateHeader returns -1 for non-existent header
Includes consistent getDateHeader results in both MockHttpServletResponse variants (spring-test and spring-web)

Issue: SPR-16160

(cherry picked from commit 80a0cf7)
2017-11-14 12:26:32 +01:00
Juergen Hoeller
9ca4de1ccf MockHttpServletRequest.getRequestURL aligns with getServerName/Port
Issue: SPR-16138

(cherry picked from commit 0edf4d6)
2017-11-14 12:25:55 +01:00
Juergen Hoeller
5f167fd7f8 Polishing 2017-09-27 01:46:16 +02:00
Juergen Hoeller
9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller
87df393f91 MockPart backport
Issue: SPR-15854
2017-09-27 00:09:09 +02:00
Juergen Hoeller
fa2c377405 Downgrade to AspectJ 1.8.9 and merge EhCache 3 tests into spring-context-support
Includes latest applicable updates (Jackson 2.8.10, OkHttp 3.8.1, Undertow 1.3.31, Netty 4.1.15)

Issue: SPR-15836
Issue: SPR-15880
2017-09-08 19:41:27 +02:00
Juergen Hoeller
55fa5f2b65 ReflectionTestUtils does not require spring-aop on the classpath
Issue: SPR-15757
(cherry picked from commit dd43b6a)
2017-07-12 22:59:12 +02:00
Rossen Stoyanchev
8d743181da Fix MockMvc + HttpPutFormContentFilter issue
Issue: SPR-15753
2017-07-11 12:03:07 +02:00
Juergen Hoeller
a17255a2e3 SimpleRequestExpectationManager properly handles sequential requests with different count
Issue: SPR-15672
(cherry picked from commit efb735a)
2017-06-30 16:06:39 +02:00
Juergen Hoeller
50235be746 Avoid JDK 7+ AssertionError constructor in 4.3.x line 2017-05-04 14:14:56 +02:00
Juergen Hoeller
9b647021f7 Allow for HttpOnly cookie result matcher
Issue: SPR-15488
(cherry picked from commit 04f0f13)
2017-05-04 14:00:37 +02:00
Juergen Hoeller
38089d8e66 Correct attributeHasNoErrors message in ModelResultMatchers
Includes consistent name quoting.

Issue: SPR-15487
(cherry picked from commit 0479dc9)
2017-05-04 14:00:15 +02:00
Juergen Hoeller
8b054840fc Minimize reflective interaction with annotation instances during retrieval
Issue: SPR-15387
(cherry picked from commit 3037277)
2017-04-13 15:53:46 +02:00
Connor Lin
8289bf0aff Remove a redundant word
Closes gh-1361
2017-03-27 10:10:14 +02:00
Juergen Hoeller
21ac764e5c Polishing 2017-03-24 13:41:34 +01:00
Juergen Hoeller
22ddb35258 HeaderValueHolder.toString() exposes underlying list of header values
Issue: SPR-15375
(cherry picked from commit 15bff8f)
2017-03-24 13:40:43 +01:00
Juergen Hoeller
98dbc17591 Polishing 2017-03-07 10:33:48 +01:00
Juergen Hoeller
9de97614a0 Adapt to HtmlUnit 2.25 getCharset() return type at runtime
Issue: SPR-15319
2017-03-07 10:33:26 +01:00