spring-boot/spring-boot-project
Andy Wilkinson bf9d23e55a Consider SpringBootTest's web environment in context cache key
Previously, the web environment configured on `@SpringBootTest` was not
part of the context cache key. As a result, two test classes that has
identical configuration other than one using a MOCK web environment and
the other using a DEFINED_PORT web environment would share a context
when they should not do so. Classes that use MOCK and RANDOM_PORT were
not affected as the use of RANDOM_PORT results in a property for the
port being added to the environment.

This commit adds a new ContextCustomizer, SpringBootTestWebEnvironment,
that is used to capture the `webEnvironment` from `@SpringBootTest`
and use it in its hashCode and equals implementations. This fixes the
problem as all context customizers are evaluated when determing the
equality of two context cache keys.

Fixes gh-23085
2020-09-24 14:43:51 +01:00
..
spring-boot Fix Log4j2 XML configuration tests on Windows 2020-09-22 16:03:58 +01:00
spring-boot-actuator Merge branch '2.1.x' into 2.2.x 2020-09-21 23:19:41 -07:00
spring-boot-actuator-autoconfigure Disable proxyBeanMethods on all management context config classes 2020-09-15 12:30:32 +01:00
spring-boot-autoconfigure Configure Flyway with initSqls for any DataSource configuration 2020-09-18 13:03:24 +01:00
spring-boot-cli Merge branch '2.1.x' into 2.2.x 2020-07-23 11:01:05 +02:00
spring-boot-dependencies Upgrade to Micrometer 1.3.14 2020-09-17 08:46:30 +02:00
spring-boot-devtools Try to make FileSystemWatcherTests.waitsForQuietPeriod() more robust 2020-08-05 09:00:49 +01:00
spring-boot-docs Fix link to Log4j's JDK Logging Adapter in reference documentation 2020-09-23 14:36:00 +02:00
spring-boot-parent Upgrade to Testcontainers 1.14.3 2020-08-28 11:57:32 +01:00
spring-boot-properties-migrator
spring-boot-starters Merge branch '2.1.x' into 2.2.x 2020-07-24 11:54:12 +01:00
spring-boot-test Consider SpringBootTest's web environment in context cache key 2020-09-24 14:43:51 +01:00
spring-boot-test-autoconfigure Replace Embedded Mongo with Testcontainers' MongoDB support 2020-08-28 12:00:31 +01:00
spring-boot-tools Fix multi-release JAR test on JDK 15 2020-09-22 10:09:18 +02:00
pom.xml