333 Commits

Author SHA1 Message Date
Madhura Bhave
1db1c8b03c Validate our own tests work with JUnit5 and the vintage engine
Closes gh-14737

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-05-08 16:05:44 +02:00
Madhura Bhave
d15347d4e5 Add Junit5 OutputCapture Extension
Closes gh-14738
2019-05-08 16:05:43 +02:00
Stephane Nicoll
c91578bbae Define surefire test provider to use
The `spring-boot-test` module has a dependency to TestNG to validate
some part of the test infrastructure but no tests are actually written
using TestNG. The presence of TestNG is a trigger for the maven surefire
plugin and it attempts to run tests using it.

This commit defines the explicit provider to use (JUnit 4)

Closes gh-16735
2019-05-07 14:22:53 +02:00
Phillip Webb
32040e355b Merge branch '2.1.x'
Closes gh-16649
2019-04-24 19:50:41 -07:00
Phillip Webb
d4151e0b51 Polish "Use Jackson configuration with JsonPath"
Polish contribution to use a factory method in `AbstractJsonMarshalTester`
rather than additional constructor arguments.

Also change the `JsonContent` tests so that the `Configuration` constructor
is package private. This keeps JsonPath classes out of our public API, at
the expense of limiting custom JsonPath configurations to just our code.

See gh-16629
2019-04-24 19:45:43 -07:00
Phillip Webb
17aaf26590 Use consistent javadoc style for annotation links
Closes gh-13920
2019-04-24 19:37:59 -07:00
Phillip Webb
1e44aba772 Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
2019-04-24 19:37:42 -07:00
Diego Berrueta
756a7f12a3 Use Jackson configuration with JsonPath
Update `JacksonTester` so that the JsonPath instance is explicitly configured
with both a `JacksonJsonProvider` and a `JacksonMappingProvider`.

Prior to this commit, the handling of special characters was not symmetrical
between the serialization (handled via the JacksonTester) and the parsing (handled
via JsonPath) due to the fact that JsonPath used `SimpleJson` as its parser.

See gh-16629
2019-04-24 18:15:46 -07:00
Phillip Webb
b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
2019-04-18 15:40:02 -07:00
Phillip Webb
5f1bbf8c72 Update copyright header of changed files 2019-04-15 17:51:08 -07:00
Phillip Webb
7d4118a0fe Align withBean methods with ApplicationContext
Rework `AbstractApplicationContextRunner.withBean` methods to
align signatures as much as possible with those provided by
the `ApplicationContext`.

Also update the implementation to use a dedicate member
variable rather than adding initializers.

Closes gh-16011
2019-04-15 17:51:08 -07:00
Phillip Webb
2dfd916c96 Polish 2019-04-15 17:51:08 -07:00
Stephane Nicoll
a780875390 Allow ApplicationContextRunner to accept simple bean definitions
This commit adds `withBean` methods to the `ApplicationContextRunner`
abstraction so that simple beans can be registered inline. This is a
nice alternative for cases where a inner configuration class has to be
defined for the purpose of creating a simple bean.

Closes gh-16011
2019-04-09 12:15:05 +02:00
Stephane Nicoll
c432288ed1 Migrate ApplicationContext to common hierarchy
This commit migrates `AnnotationConfigReactiveWebApplicationContext`
parent to the `GenericApplicationContext` abstraction. Any use of
`AnnotationConfigWebApplicationContext` is also removed as it also
inherits from the `AbstractRefreshableApplicationContext` outdated
hierarchy.

A new `AnnotationConfigServletWebApplicationContext` context is
introduced instead, extending from `GenericApplicationContext` and
providing the counter part of the reactive context for the Servlet-based
web app tests.

See gh-16096
2019-04-05 14:17:41 +02:00
Phillip Webb
ad7eebee9e Merge branch '2.1.x' 2019-04-03 17:00:25 -07:00
Phillip Webb
f12ab1ff90 Update copyright header of changed files 2019-04-03 16:13:00 -07:00
Phillip Webb
2376f973f4 Merge branch '2.1.x' 2019-04-02 13:46:36 -07:00
Phillip Webb
47c6bf741d Merge branch '2.0.x' into 2.1.x 2019-04-02 13:40:21 -07:00
Phillip Webb
07c000c5b7 Merge branch '1.5.x' into 2.0.x 2019-04-02 13:34:28 -07:00
Madhura Bhave
8daa8c48fb Merge branch '2.1.x' 2019-04-01 15:51:25 -07:00
Madhura Bhave
c592e71449 Override missing methods in FilteredClassLoader
Closes gh-16404
2019-04-01 15:42:02 -07:00
Andy Wilkinson
878a635bfb Merge branch '2.1.x' 2019-03-28 11:48:47 +00:00
Andy Wilkinson
5a3474c7a8 Polish "Use HTTPS for external links wherever possible"
See gh-16320
2019-03-28 10:53:01 +00:00
Andy Wilkinson
864942ad4f Merge branch '2.0.x' into 2.1.x 2019-03-28 09:35:53 +00:00
Spring Operator
1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
2019-03-27 20:06:52 +00:00
Andy Wilkinson
ba4671f0ab Merge branch '1.5.x' into 2.0.x 2019-03-27 19:59:36 +00:00
Andy Wilkinson
4900505425 Merge branch '2.0.x' into 2.1.x 2019-03-26 13:53:57 +00:00
Andy Wilkinson
fedb40a2bf Merge branch '1.5.x' into 2.0.x 2019-03-26 13:48:32 +00:00
Madhura Bhave
95d10388dd Merge branch '2.1.x' 2019-03-25 11:03:10 -07:00
Madhura Bhave
0c2e71cd08 Prevent early initialization of factory beans in text context customizers
Until Spring Framework 5.1.15, a FactoryBean with a non-default constructor
defined via component scanning would cause an error. This behavior has changed
as of https://github.com/spring-projects/spring-framework/issues/22409.
Regardless of this change we want to ensure that we avoid triggering eager
initialisation. `SimpleFactoryBean` has been written this way so that the tests
fail if early initialization is triggered regardless of the Spring Framework version.

Fixes gh-15898
2019-03-25 10:55:41 -07:00
Andy Wilkinson
36c1c051b8 Merge branch '2.1.x' 2019-03-20 16:55:10 +00:00
Andy Wilkinson
e23f72c8b0 Merge branch '2.0.x' into 2.1.x 2019-03-20 16:53:48 +00:00
Andy Wilkinson
9fbd38ab3c Merge branch '1.5.x' into 2.0.x 2019-03-20 16:45:26 +00:00
Spring Operator
00ab30362c Use HTTPS for external links in XML files
See gh-16270
2019-03-20 14:33:25 +00:00
Andy Wilkinson
b828b398b5 Merge branch '2.1.x' 2019-03-19 17:11:45 +00:00
Andy Wilkinson
a36aa67b52 Merge branch '2.0.x' into 2.1.x 2019-03-19 17:04:41 +00:00
Spring Operator
3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
2019-03-19 16:58:31 +00:00
Madhura Bhave
0611eb49c8 Merge branch '2.1.x' 2019-03-18 18:03:32 -07:00
Madhura Bhave
7ea8770524 Polish "Fix request factory used with withBasicAuth"
Fixes gh-15982
2019-03-18 18:00:17 -07:00
Dmytro Nosan
756bd890eb Fix request factory used with TestRestTemplate withBasicAuth
This commit updates the behavior of withBasicAuth on TestRestTemplate
by trying to use the same request factory type as the underlying restTemplate.
If creation of a new instance of the configured request factory class fails,
it falls back to the `ClientHttpRequestFactorySupplier`.

See gh-15982
2019-03-18 18:00:08 -07:00
Madhura Bhave
1893eeef4f Merge branch '2.1.x' 2019-03-15 17:27:10 -07:00
Dmytro Nosan
2f3e5d65be Test server port shouldn't affect management port when random
Closes gh-16108
2019-03-15 17:21:29 -07:00
Madhura Bhave
2cdc93cf19 Make TestRestTemplate withBasicAuth fault tolerant
It's part of TestRestTemplate's contract that it's fault tolerant. This
commit aligns the behavior of `withBasicAuth` with that expectation.

Closes gh-15780
2019-03-13 11:49:42 -07:00
Andy Wilkinson
68bfb020aa Reduce need for bean method proxying and disable where not needed
Closes gh-9068
2019-03-12 13:18:42 +00:00
Phillip Webb
dd3e8154d9 Merge branch '2.1.x' 2019-03-11 22:15:19 -07:00
Phillip Webb
fc3aa43cc2 Update copyright year for changed files 2019-03-11 22:14:53 -07:00
Andy Wilkinson
aa2008bc5a Merge branch '2.1.x' 2019-03-11 16:40:19 +00:00
Andy Wilkinson
8c3cec8f13 Merge branch '2.0.x' into 2.1.x 2019-03-11 16:14:19 +00:00
Andy Wilkinson
361437f4e2 Merge branch '1.5.x' into 2.0.x 2019-03-11 15:53:34 +00:00
Stephane Nicoll
b34b217d1e Upgrade to Kotlin 1.3.21
Closes gh-16195
2019-03-11 15:56:13 +01:00