Commit Graph

298 Commits (7a8088d7a233804ccd943fe46c1aacd870c13ce3)

Author SHA1 Message Date
Stephane Nicoll fd94608f73 Polish "Restore proxying of @Bean methods in @TestConfiguration"
See gh-18675
5 years ago
Andy Wilkinson c75b06c76c Remove @ImmutableConfigurationProperties
Closes gh-18563
5 years ago
Stephane Nicoll 32a1cdf4d3 Polish "Use dedicated method to turn off authentication"
See gh-18538
5 years ago
Michael Simons 04a01a49c2 Use dedicated method to turn off authentication
See gh-18538
5 years ago
Andy Wilkinson 96f85a40de Support customization of WebTestClient.Builder when using @SpringBootTest
Closes gh-15132
5 years ago
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
5 years ago
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
5 years ago
Phillip Webb b65ba60980 Polish 'Simplify some code'
See gh-18438
5 years ago
Phillip Webb e41c5a4327 Require annotation signal for constructor binding
Update `@ConfigurationProperties` constructor binding support to only
apply when a `@ConstructorBinding` annotation is present on either the
type or the specific constructor to use.

Prior to this commit we didn't have a good way to tell when constructor
binding should be used vs regular autowiring.

For convenience, an `@ImmutableConfigurationProperties` meta-annotation
has also been added which is composed of `@ConfigurationProperties` and
`@ConstructorBinding`.

Closes gh-18469
5 years ago
Phillip Webb ecf751e7eb Polish 5 years ago
Andy Wilkinson 79d8089cd0 Remove redundant spring-plugin-core dependencies
Closes gh-18317
5 years ago
Andy Wilkinson 6534047fcf Rework test slice annotation javadoc to reflect JUnit 5 default
Closes gh-18178
5 years ago
dreis2211 07b857e57a Use disabledWithoutDocker option for @Testcontainers
See gh-18095
5 years ago
dreis2211 b4350a9d96 Remove unnecessary blank lines
See gh-18089
5 years ago
freekry e1611287c8 Simplify some code
See gh-18077
5 years ago
Andy Wilkinson 2d2e3b3d8b Support parallel test execution with @AutoConfigureMockMvc
Previously, the deferred line writing that is used, to print MockMvc
results to the console assumed that each DeferredLinesWriter would
only be used by a single thread at a time. This assumption does not
hold true when using JUnit 5's parallel test exection if the tests
running in parallel share an application context. This resulted in
a concurrent modification exception if one thread was adding lines
to the output while another was iterating over them.

This commit updates DeferredLinesWriter so that it uses thread local
storage for the deferred lines. This ensures that each List of lines
is only ever accessed by a single thread.

Closes gh-16179
5 years ago
Phillip Webb 94b5ad0f7e Fixup tests following upstream HATEOAS changes
See gh-17755
5 years ago
Phillip Webb da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
5 years ago
Phillip Webb 6675f49334 Switch to multi-line security configuration
Now that we have lambda style security configuration we can further
improve readability by switching to one statement per line.

See gh-17525
5 years ago
Madhura Bhave 39a7b9da38 Switch to lambda style security configuration
Closes gh-17525
5 years ago
Phillip Webb 8bc780762a Merge branch '2.1.x' 5 years ago
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 5 years ago
Dmytro Nosan 9d052bbe5e Include WebFilter beans in WebFluxTest slice
See gh-17601
5 years ago
Dmytro Nosan 6859a89cf3 Include HandlerInterceptor beans in WebMvcTest slice
See gh-17600
5 years ago
Stephane Nicoll e5ca9df478 Merge branch '2.1.x' 5 years ago
Stephane Nicoll 8eb6886388 Fix code formating 5 years ago
Stephane Nicoll 08afbe286c Merge branch '2.1.x'
Closes gh-17580
5 years ago
Stephane Nicoll b8d92cb0ae Fix @DataJdbcTest to be transactional as advertized
Closes gh-17513
5 years ago
Stephane Nicoll 5903e9a57a Polish 5 years ago
Phillip Webb 30b5ba87ae Merge branch '2.0.x' into 2.1.x 5 years ago
Andy Wilkinson 808b373def Merge branch '2.1.x'
Closes gh-17552
5 years ago
Andy Wilkinson 9dabc0e14d Cleared deferred lines after each test
Previously, DeferredLinesWriter would collect MockMvc output from
every test that has executed. If a test eventually failed, the
output from every test up to including the one that had failed would
be output, rather than just the output for the test that has just
failed.

This commit clears the deferred lines after each test, thereby
ensuring that when a failure occurs only the lines from the failing
test are output.

Fixes gh-17551
5 years ago
Stephane Nicoll a3e94f4412 Harmonize component scan in slice tests
This commit updates ConfigurationPropertiesScanRegistrar to apply the
same component scan filters than the ones applied on standard classpath
scanning.

As a result, configuration properties scanning is automatically disabled
in slice tests and can be included by an explicit import or a dedicated
TypeFilter implementation if necessary.

Closes gh-16659
5 years ago
Phillip Webb eff1147ccc Rename classpath runner package
Remove `runner` since we're no longer tied to JUnit 4.

See gh-17491
5 years ago
Phillip Webb 1117fdb2b3 Make ModifiedClassPathExtension package private
Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with
so that the `ModifiedClassPathExtension` no longer needs to be
used directly.

See gh-17491
5 years ago
Phillip Webb 4fe5e9e31e Remove direct junit-platform-launcher dependency
Replace any direct `junit-platform-launcher` dependencies and instead
rely on the test runner providing it. Launcher related class are not
handled via reflection.

This update allows us to workaround SUREFIRE-1679.

Closes gh-17517
5 years ago
dreis2211 0f0278e69b Migrate ModifiedClassPath tests to JUnit 5
Migrate the remaining JUnit 4 tests to JUnit 5, making use of the
new `ModifiedClassPathExtension`.

See gh-17491
5 years ago
dreis2211 ca1808ecae Migrate to MockRestServiceServer
Migrate `RestClientTestWithoutJacksonIntegrationTests` to use
Spring's `MockRestServiceServer`.

See gh-17491
5 years ago
Phillip Webb 01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
5 years ago
Phillip Webb c3816bfe7b Polish output capture names 5 years ago
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
5 years ago
Phillip Webb 605599138e Merge branch '2.1.x' 5 years ago
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 5 years ago
Phillip Webb c62b6b4ccd Merge branch '2.1.x' 5 years ago
Phillip Webb de35efd1ef Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb bb34846630 Merge branch '1.5.x' into 2.0.x 5 years ago
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
5 years ago
Andy Wilkinson a189e4cf96 Merge branch '2.1.x'
Closes gh-17220
6 years ago