Commit Graph

468 Commits

Author SHA1 Message Date
Phillip Webb d06407ec0a Update copyright year of changed files 2021-01-26 19:06:14 -08:00
Phillip Webb d95d7a0245 Update code for Spring Framework 5.3.4
See gh-24998
2021-01-26 17:35:54 -08:00
Andy Wilkinson a67edfbeb7 Merge branch '2.3.x' into 2.4.x
Closes gh-24518
2020-12-15 17:21:39 +00:00
Andy Wilkinson 76198f9a8d Include properties from test-autoconfigure in config props appendix
Closes gh-24486
2020-12-15 17:20:21 +00:00
Phillip Webb 72d36e0c07 Update copyright year of changed files 2020-12-10 10:46:04 -08:00
Stephane Nicoll 93d83342d2 Merge branch '2.3.x'
Closes gh-24401
2020-12-08 15:42:52 +01:00
Stephane Nicoll 06671aa50e Stop deferring JPA bootstrap mode by default
This commit changes the default value of bootstrap-mode to "default"
rather than "deferred" so that the JPA infrastructure starts in the
main thread rather than asynchronously.

Closes gh-24249
2020-12-08 15:42:14 +01:00
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
2020-12-04 18:31:55 -08:00
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
2020-12-04 18:21:57 -08:00
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
2020-12-04 18:05:53 -08:00
Stephane Nicoll b6fc0913cf Merge branch '2.3.x'
Closes gh-24104
2020-11-10 17:44:05 +01:00
Stephane Nicoll 515b18e142 Merge branch '2.3.x'
Closes gh-24108
2020-11-10 17:10:26 +01:00
Stephane Nicoll 9e901b6e07 Upgrade to Testcontainers 1.15.0
Closes gh-24103
2020-11-10 16:24:16 +01:00
Stephane Nicoll 23ad2b4156 Rationalize Testcontainers image versions
This commit rationalizes the Docker image names used in integration
tests.

Closes gh-24107
2020-11-10 16:04:27 +01:00
Andy Wilkinson a4505eaeb0 Merge branch '2.3.x'
Closes gh-24024
2020-11-04 09:41:41 +00:00
Andy Wilkinson 81f672eae3 Merge branch '2.2.x' into 2.3.x
Closes gh-24023
2020-11-04 09:40:54 +00:00
Andy Wilkinson 28ccf54b21 Ignore schema username when auto-configuring a test DB
Previously, when an embedded test database was being auto-configured
any schema username and password specified by the user would result
in a separate embedded test database being created to load the schema.
This then left the actual test database without the schema causing
test failures.

This commit updates the test database auto-configuration to set the
schema username to an empty string in a property source that's added
first to the environment's property sources. This causes any schema
username configured by the user to be ignored, preventing the creation
of a separate database for schema.sql processing.

Fixes gh-19321
2020-11-04 09:30:19 +00:00
Andy Wilkinson c93d91175d Merge branch '2.3.x'
Closes gh-24007
2020-11-03 10:27:53 +00:00
Andy Wilkinson 2513071b1f Merge branch '2.2.x' into 2.3.x
Closes gh-24006
2020-11-03 10:27:38 +00:00
Andy Wilkinson 622606d85a Make it clearer that only the main DataSource bean may be replaced
Closes gh-23808
2020-11-03 10:24:44 +00:00
Andy Wilkinson 8004a821f2 Fix nested test config discovery for sliced tests
Fixes gh-23984
2020-11-02 20:40:27 +00:00
Phillip Webb 929d8fcd3c Update copyright year of changed files 2020-10-29 09:08:13 -07:00
Andy Wilkinson 506f7acc8d Streamline use of TestContextAnnotationUtils
See gh-12470
2020-10-28 10:20:14 +00:00
Andy Wilkinson 6b437ece54 Inherit enclosing class's configuration in nested tests
Fixes gh-12470
2020-10-28 08:56:42 +00:00
Phillip Webb 11a153869f Polish 'Support nested @PropertyMapping annotations'
See gh-23146
2020-10-27 18:49:04 -07:00
Stefan Zwanenburg edf4c833c2 Support nested @PropertyMapping annotations
Update `AnnotationsPropertySource` so that nested annotations are
supported. Prior to this commit, annotations annotated with
`@PropertyMapping` that contained nested annotation attributes would
result in instances of `TypeMappedAnnotation` being used as properties.
This usually led to errors due to not being able to convert those to
Strings. This commit makes it so that nested annotations are recursively
mapped to properties. This should allow for more complex configuration
to be mapped from annotations.

See gh-23146
2020-10-27 18:48:46 -07:00
Brian Clozel 9c54a5369d Merge branch '2.3.x'
Closes gh-23816
2020-10-22 21:40:22 +02:00
Brian Clozel b37eecc015 Merge branch '2.2.x' into 2.3.x
Closes gh-23812
2020-10-22 20:16:01 +02:00
Brian Clozel 5eb1e26e10 Add HttpEncodingAutoConfiguration to WebMvcTest
Prior to this commit, tests using the `@WebMvcTest` annotation would not
include the `HttpEncodingAutoConfiguration`. This means that, even if
configured, the encoding filter would not be configured in MVC tests,
resulting in an inconsistency with `@SpringBootTest` tests.

This commit ensures that the `HttpEncodingAutoConfiguration` is included
when `@WebMvcTest` is used.

Fixes gh-23749
2020-10-22 20:02:45 +02:00
Stephane Nicoll a5b27789c0 Document how to use DataNeo4jTest with reactive access
Closes gh-23630
2020-10-14 14:04:58 +02:00
Madhura Bhave 7c22e71753 Polish "Deprecate EmbeddedDatabaseConnection#HSQL"
See gh-23565
2020-10-01 16:56:48 -07:00
Stephane Nicoll 366fec33d0 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
2020-09-30 13:46:57 +02:00
Stephane Nicoll 2852ea0808 Remove useless version override for MongoDBContainer
Closes gh-23520
2020-09-29 10:50:30 +02:00
Phillip Webb c284edde67 Update copyright year of changed files 2020-09-17 00:31:01 -07:00
Stephane Nicoll 91cc283c39 Upgrade to JUnit Jupiter 5.7.0
Closes gh-23351
2020-09-16 13:28:31 +02:00
Stephane Nicoll 5a86162ff3 Polish "Simplify code"
See gh-23111
2020-09-01 10:06:17 +02:00
EruDev ffc577b499 Simplify code
See gh-23111
2020-09-01 10:04:31 +02:00
Andy Wilkinson 9ee2487a6e Merge branch '2.3.x'
Closes gh-23128
2020-08-28 14:37:20 +01:00
dreis2211 51c9dee899 Use DynamicPropertySource in MongoDB tests
See gh-23127
2020-08-28 14:32:01 +01:00
Andy Wilkinson 2c166d1a58 Merge branch '2.3.x'
Closes gh-23125
2020-08-28 12:29:29 +01:00
Andy Wilkinson 33ef1b6e5b Merge branch '2.2.x' into 2.3.x
Closes gh-23124
2020-08-28 12:29:07 +01:00
Andy Wilkinson 5cd910c7ce Replace Embedded Mongo with Testcontainers' MongoDB support
Closes gh-23090
2020-08-28 12:00:31 +01:00
Andy Wilkinson cf0036992f Increase timeouts used in Cassandra integration tests
Closes gh-23083
2020-08-25 16:33:26 +01:00
Phillip Webb 4df618a2b1 Merge branch '2.3.x'
Closes gh-22967
2020-08-14 17:12:53 -07:00
Phillip Webb f75e988450 Merge branch '2.2.x' into 2.3.x
Closes gh-22966
2020-08-14 17:12:41 -07:00
Phillip Webb 3271542d98 Add @Interited to @TypeExcludeFilters
Update `@TypeExcludeFilters` so that it is also annotated with
`@Inherited`.

Closes gh-22939
2020-08-14 17:12:31 -07:00
Madhura Bhave bbbbe8e4d2 Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
2020-08-14 12:24:25 -07:00
Scott Frederick 2a998a4373 Fix DataNeo4jTestReactiveIntegrationTests
See gh-22940
2020-08-13 13:45:04 -05:00
Stephane Nicoll 045d2f678d Document Spring Data Neo4j 6 support
Closes gh-22652
2020-08-13 17:51:39 +02:00
Andy Wilkinson 0d8719adb7 Merge branch '2.3.x'
Closes gh-22911
2020-08-12 13:14:33 +01:00
Andy Wilkinson 65ccb514d0 Merge branch '2.2.x' into 2.3.x
Closes gh-22910
2020-08-12 13:14:15 +01:00
Johnny Lim 68e2dd626d Mention configuration customizers for WebTestClient and RestAssured
See gh-22765
2020-08-12 13:13:11 +01:00
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
2020-08-10 15:22:03 +01:00
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 2020-08-06 14:35:43 -07:00
Stephane Nicoll dac63fc3e5 Polish 2020-08-06 17:35:01 +02:00
Stephane Nicoll 313b2bef6f Polish "Add test slice for Spring Data Cassandra"
See gh-17490
2020-08-05 16:46:52 +02:00
ayudovin ae152b176b Add test slice for Spring Data Cassandra
See gh-17490
2020-08-05 16:46:52 +02:00
Stephane Nicoll 36fb86a110 Update to core r2dbc support
This commit adapts the auto-configuration for the new core r2dbc support
in Spring Framework and provides auto-configuration for
R2dbcEntityOperations.

Closes gh-22708
2020-08-04 16:00:29 +02:00
Andy Wilkinson 5f1198c917 Merge branch '2.3.x'
Closes gh-22670
2020-07-30 12:13:04 +01:00
Andy Wilkinson 45346b63ba Merge branch '2.2.x' into 2.3.x
Closes gh-22669
2020-07-30 12:12:45 +01:00
Andy Wilkinson 22dc4e7608 Clarify documentation on @AutoConfigureRestDocs with WebTestClient
Closes gh-15977
2020-07-30 12:12:10 +01:00
Stephane Nicoll 9bc71fe44f Polish "Upgrade to Spring Data Neo4j 6"
See gh-22299
2020-07-29 19:36:42 +02:00
Gerrit Meier 15cd343737 Upgrade to Spring Data Neo4j 6
See gh-22299
2020-07-29 18:58:08 +02:00
Andy Wilkinson 8a9cc64221 Merge branch '2.3.x'
Closes gh-22577
2020-07-27 10:12:09 +01:00
Andy Wilkinson 5279b90ced Merge branch '2.2.x' into 2.3.x
Closes gh-22576
2020-07-27 10:11:47 +01:00
Andy Wilkinson 1c3528f5a4 Include Jackson Modules in WebMvcTest and WebFluxTest
Fixes gh-22530
2020-07-27 10:11:29 +01:00
Stephane Nicoll 3530ac9b0c Polish "Disable metrics export in integration tests"
See gh-21658
2020-07-24 15:43:17 +02:00
bono007 b1830da0da Disable metrics export in integration tests
This commit introduces a new property to globally disable metrics
export. In integration tests, this property is automatically set to
disable everything but in-memory metrics.

This commit also introduces a `@AutoConfigureMetrics` annotation that
can be used for integration tests that require metrics export to operate
as they would in an application.

See gh-21658
2020-07-24 15:43:17 +02:00
Andy Wilkinson 0ac7178ae1 Merge branch '2.3.x'
Closes gh-22491
2020-07-22 06:43:28 +01:00
dreis2211 198131f5e4 Remove redundant compiler arguments in Gradle build files
See gh-22488
2020-07-22 06:42:48 +01:00
Andy Wilkinson 0d6ea79007 Start building against Spring Framework 5.3.0 snapshots
See gh-21929
2020-06-22 18:02:21 +01:00
Stephane Nicoll f0f8424191 Merge branch '2.3.x'
Closes gh-22008
2020-06-18 11:31:00 +02:00
dreis2211 855d596c2a Use lazy lambda instead of explicit argument
See gh-21986
2020-06-18 11:29:49 +02:00
Andy Wilkinson 9e08490522 Merge branch 'gh-21271'
Closes gh-21271
2020-06-16 12:52:17 +01:00
Andy Wilkinson 9636350b0b Enable rawtypes compilation warnings
See gh-21271
2020-06-16 12:50:50 +01:00
Andy Wilkinson 47874d8c6a Treat warnings as errors when compiling
See gh-21271
2020-06-16 12:50:41 +01:00
Andy Wilkinson 0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
2020-06-16 08:50:21 +01:00
Andy Wilkinson ce68f1a097 Merge branch '2.2.x' into 2.3.x
Closes gh-21837
2020-06-10 09:56:24 +01:00
Andy Wilkinson 48acaa4bd9 Make AutoConfigureMockMvc use SecurityProperties' filter ordering
Previously, AutoConfigureMockMvc used Spring Security's default filter
ordering, ignoring the value configured by SecurityProperties that is
used at runtime. This resulted in different ordering at runtime and in
tests.

This commit updates the configuration for AutoConfigureMockMvc to
import the Spring Security filter auto-configuration, thereby ensuring
that the ordering configured via SecurityProperties is applied.

Fixes gh-21801
2020-06-10 09:51:05 +01:00
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
2020-06-03 12:55:11 +01:00
dreis2211 b498d3903f Upgrade to Testcontainers 1.14.2
See gh-21581
2020-05-27 14:49:09 +02:00
Stephane Nicoll b9a1a70fcc Merge branch '2.2.x'
Closes gh-21562
2020-05-25 14:59:19 +02:00
Stephane Nicoll 77981ac2ae Polish "Use the container IP address for tests using TestContainer"
See gh-21480
2020-05-25 14:29:24 +02:00
olivier lamy 0c2bf70bb8 Use the container IP address for tests using TestContainer
See gh-21480
2020-05-25 14:03:18 +02:00
Stephane Nicoll e6376fcd6e Fix web services tests on JDK 11+
Closes gh-17274
2020-05-14 10:55:12 +02:00
Phillip Webb 194c9fac64 Polish 'Add @WebServiceClientTest slice test support'
See gh-17274
2020-05-14 00:21:50 -07:00
Dmytro Nosan a4104ab096 Add @WebServiceClientTest slice test support
Add `@WebServiceClientTest` and related test auto-configuration to allow
slice testing of Spring Web Service client applications.

See gh-17274
2020-05-14 00:21:50 -07:00
Andy Wilkinson 83e4bb39b6 Add transaction auto-configuration to @DataMongoTest
Closes gh-20182
2020-04-30 15:05:23 +01:00
Stephane Nicoll 12123d41e5 Make sure @DataR2dbcTest invokes database migration if necessary
Closes gh-20739
2020-03-31 13:10:37 +02:00
Andy Wilkinson 56af3534f0 Merge branch '2.2.x'
Closes gh-20740
2020-03-31 11:37:12 +01:00
Andy Wilkinson ce95fd6825 Polish "Use @DynamicPropertySource for Neo4J and Redis data tests"
See gh-20676
2020-03-31 11:31:05 +01:00
dreis2211 d84422a41c Use @DynamicPropertySource for Neo4J and Redis data tests
See gh-20676
2020-03-31 11:31:05 +01:00
Stephane Nicoll 6817856e7d Add test slice for Spring Data R2DBC
This commit adds a test slice for Spring Data R2DBC. When
`DataR2dbcTest` is added on a test, only Spring Data R2DBC repositories
and the infrastructure that they need is auto-configured.

Contrary to the JDBC counterpart, the `ConnectionFactory` is not swapped
by an embedded database.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
2020-02-25 09:21:47 -05:00
Johnny Lim 8be8a8421d Polish
See gh-20226
2020-02-19 09:34:46 +01:00
dreis2211 aa0360e1ba Fix some deprecation warnings
See gh-20108
2020-02-10 15:28:30 +01:00
Madhura Bhave 0a377647ca Import OAuth2 auto-configurations in web slice tests
Fixes gh-19823
2020-02-03 18:03:52 -08:00
Stephane Nicoll c4daff7225 Polish "Upgrade to MongoDB Java Driver 4.0 beta1"
See gh-19960
2020-02-03 14:12:46 +01:00
Christoph Strobl d2d6dbdc00 Upgrade to MongoDB Java Driver 4.0 beta1
See gh-19960
2020-02-03 10:59:30 +01:00
Stephane Nicoll bae1d8d780 Polish "Use new AssertJ duration assertions"
See gh-19985
2020-01-30 08:20:49 +01:00
dreis2211 fac6f08ca3 Use new AssertJ duration assertions
See gh-19985
2020-01-30 08:14:49 +01:00