Browse Source

Make ModifiedClassPathExtension package private

Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with
so that the `ModifiedClassPathExtension` no longer needs to be
used directly.

See gh-17491
pull/17522/head
Phillip Webb 7 years ago
parent
commit
1117fdb2b3
  1. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/Log4J2MetricsWithLog4jLoggerContextAutoConfigurationTests.java
  2. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MetricsAutoConfigurationWithLog4j2AndLogbackTests.java
  3. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/redis/RedisHealthIndicatorAutoConfigurationTests.java
  4. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/jersey/JerseyChildManagementContextConfigurationTests.java
  5. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/jersey/JerseySameManagementContextConfigurationTests.java
  6. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJdbcTests.java
  7. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJpaTests.java
  8. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java
  9. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache2CacheAutoConfigurationTests.java
  10. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache3CacheAutoConfigurationTests.java
  11. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBeanWithFilteredClasspathTests.java
  12. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnBeanConditionTypeDeductionFailureTests.java
  13. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationJedisTests.java
  14. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationWithoutJacksonTests.java
  15. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java
  16. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfigurationWithoutJacksonTests.java
  17. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzerTests.java
  18. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jsonb/JsonbAutoConfigurationWithNoProviderTests.java
  19. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/Hibernate2ndLevelCacheIntegrationTests.java
  20. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationWithoutSecurityTests.java
  21. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationWithHibernateValidatorMissingElImplTests.java
  22. 3
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationWithoutValidatorTests.java
  23. 3
      spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsEmbeddedDataSourceAutoConfigurationTests.java
  24. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestDatabaseAutoConfigurationNoEmbeddedTests.java
  25. 3
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTestWithoutJacksonIntegrationTests.java
  26. 2
      spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactoryTests.java
  27. 6
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ClassPathExclusions.java
  28. 6
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ClassPathOverrides.java
  29. 3
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathExtension.java
  30. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathExtensionExclusionsTests.java
  31. 2
      spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathExtensionOverridesTests.java
  32. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationNoWebTests.java
  33. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java
  34. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java
  35. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/ValidationExceptionFailureAnalyzerTests.java
  36. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/NoSnakeYamlPropertySourceLoaderTests.java
  37. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceUnwrapperNoSpringJdbcTests.java
  38. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/validation/MessageInterpolatorFactoryWithoutElIntegrationTests.java
  39. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/HttpWebServiceMessageSenderBuilderOkHttp3IntegrationTests.java
  40. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/HttpWebServiceMessageSenderBuilderSimpleIntegrationTests.java

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/Log4J2MetricsWithLog4jLoggerContextAutoConfigurationTests.java

@ -19,13 +19,11 @@ package org.springframework.boot.actuate.autoconfigure.metrics; @@ -19,13 +19,11 @@ package org.springframework.boot.actuate.autoconfigure.metrics;
import io.micrometer.core.instrument.binder.logging.Log4j2Metrics;
import org.apache.logging.log4j.LogManager;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathOverrides;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathOverrides("org.apache.logging.log4j:log4j-core:2.11.1")
class Log4J2MetricsWithLog4jLoggerContextAutoConfigurationTests {

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MetricsAutoConfigurationWithLog4j2AndLogbackTests.java

@ -18,12 +18,10 @@ package org.springframework.boot.actuate.autoconfigure.metrics; @@ -18,12 +18,10 @@ package org.springframework.boot.actuate.autoconfigure.metrics;
import io.micrometer.core.instrument.binder.logging.LogbackMetrics;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathOverrides;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathOverrides({ "org.apache.logging.log4j:log4j-core:2.9.0", "org.apache.logging.log4j:log4j-slf4j-impl:2.9.0" })
class MetricsAutoConfigurationWithLog4j2AndLogbackTests {

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/redis/RedisHealthIndicatorAutoConfigurationTests.java

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
package org.springframework.boot.actuate.autoconfigure.redis;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator;
@ -27,7 +26,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; @@ -27,7 +26,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Phillip Webb
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions({ "reactor-core*.jar", "lettuce-core*.jar" })
class RedisHealthIndicatorAutoConfigurationTests {

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/jersey/JerseyChildManagementContextConfigurationTests.java

@ -19,7 +19,6 @@ package org.springframework.boot.actuate.autoconfigure.web.jersey; @@ -19,7 +19,6 @@ package org.springframework.boot.actuate.autoconfigure.web.jersey;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
@ -28,7 +27,6 @@ import org.springframework.boot.test.context.FilteredClassLoader; @@ -28,7 +27,6 @@ import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -43,7 +41,6 @@ import static org.mockito.Mockito.verify; @@ -43,7 +41,6 @@ import static org.mockito.Mockito.verify;
* @author Andy Wilkinson
* @author Madhura Bhave
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-webmvc-*")
class JerseyChildManagementContextConfigurationTests {

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/jersey/JerseySameManagementContextConfigurationTests.java

@ -18,7 +18,6 @@ package org.springframework.boot.actuate.autoconfigure.web.jersey; @@ -18,7 +18,6 @@ package org.springframework.boot.actuate.autoconfigure.web.jersey;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
@ -28,7 +27,6 @@ import org.springframework.boot.test.context.FilteredClassLoader; @@ -28,7 +27,6 @@ import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -42,7 +40,6 @@ import static org.mockito.Mockito.verify; @@ -42,7 +40,6 @@ import static org.mockito.Mockito.verify;
*
* @author Madhura Bhave
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-webmvc-*")
class JerseySameManagementContextConfigurationTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJdbcTests.java

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
package org.springframework.boot.autoconfigure.batch;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
@ -29,7 +28,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; @@ -29,7 +28,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.PlatformTransactionManager;
@ -41,7 +39,6 @@ import static org.mockito.Mockito.mock; @@ -41,7 +39,6 @@ import static org.mockito.Mockito.mock;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-jdbc-*.jar")
class BatchAutoConfigurationWithoutJdbcTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJpaTests.java

@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.batch; @@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.batch;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
@ -34,7 +33,6 @@ import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfigu @@ -34,7 +33,6 @@ import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfigu
import org.springframework.boot.jdbc.DataSourceInitializationMode;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
@ -45,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -45,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("hibernate-jpa-*.jar")
class BatchAutoConfigurationWithoutJpaTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java vendored

@ -41,7 +41,6 @@ import org.infinispan.configuration.cache.ConfigurationBuilder; @@ -41,7 +41,6 @@ import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.jcache.embedded.JCachingProvider;
import org.infinispan.spring.embedded.provider.SpringEmbeddedCacheManager;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.config.BeanPostProcessor;
@ -50,7 +49,6 @@ import org.springframework.boot.autoconfigure.cache.support.MockCachingProvider; @@ -50,7 +49,6 @@ import org.springframework.boot.autoconfigure.cache.support.MockCachingProvider;
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
@ -87,7 +85,6 @@ import static org.mockito.Mockito.verify; @@ -87,7 +85,6 @@ import static org.mockito.Mockito.verify;
* @author Mark Paluch
* @author Ryon Day
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("hazelcast-client-*.jar")
class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache2CacheAutoConfigurationTests.java vendored

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
package org.springframework.boot.autoconfigure.cache;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.DefaultCacheAndCustomizersConfiguration;
@ -25,7 +24,6 @@ import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests. @@ -25,7 +24,6 @@ import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.
import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.EhCacheCustomCacheManager;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import static org.assertj.core.api.Assertions.assertThat;
@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("ehcache-3*.jar")
class EhCache2CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/EhCache3CacheAutoConfigurationTests.java vendored

@ -18,11 +18,9 @@ package org.springframework.boot.autoconfigure.cache; @@ -18,11 +18,9 @@ package org.springframework.boot.autoconfigure.cache;
import org.ehcache.jsr107.EhcacheCachingProvider;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfigurationTests.DefaultCacheConfiguration;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.cache.jcache.JCacheCacheManager;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("ehcache-2*.jar")
class EhCache3CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBeanWithFilteredClasspathTests.java

@ -17,11 +17,9 @@ @@ -17,11 +17,9 @@
package org.springframework.boot.autoconfigure.condition;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-context-support-*.jar")
class ConditionalOnMissingBeanWithFilteredClasspathTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnBeanConditionTypeDeductionFailureTests.java

@ -18,11 +18,9 @@ package org.springframework.boot.autoconfigure.condition; @@ -18,11 +18,9 @@ package org.springframework.boot.autoconfigure.condition;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.condition.OnBeanCondition.BeanTypeDeductionException;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("jackson-core-*.jar")
class OnBeanConditionTypeDeductionFailureTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationJedisTests.java

@ -17,14 +17,12 @@ @@ -17,14 +17,12 @@
package org.springframework.boot.autoconfigure.data.redis;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration.JedisClientConfigurationBuilder;
@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Mark Paluch
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("lettuce-core-*.jar")
class RedisAutoConfigurationJedisTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationWithoutJacksonTests.java

@ -17,13 +17,11 @@ @@ -17,13 +17,11 @@
package org.springframework.boot.autoconfigure.hateoas;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebApplicationContext;
import org.springframework.mock.web.MockServletContext;
@ -32,7 +30,6 @@ import org.springframework.mock.web.MockServletContext; @@ -32,7 +30,6 @@ import org.springframework.mock.web.MockServletContext;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("jackson-*.jar")
class HypermediaAutoConfigurationWithoutJacksonTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java

@ -23,7 +23,6 @@ import com.hazelcast.config.QueueConfig; @@ -23,7 +23,6 @@ import com.hazelcast.config.QueueConfig;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.AutoConfigurations;
@ -31,7 +30,6 @@ import org.springframework.boot.test.context.assertj.AssertableApplicationContex @@ -31,7 +30,6 @@ import org.springframework.boot.test.context.assertj.AssertableApplicationContex
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ContextConsumer;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
@ -43,7 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -43,7 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("hazelcast-client-*.jar")
class HazelcastAutoConfigurationServerTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfigurationWithoutJacksonTests.java

@ -17,12 +17,10 @@ @@ -17,12 +17,10 @@
package org.springframework.boot.autoconfigure.http;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
@ -32,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("jackson-*.jar")
class HttpMessageConvertersAutoConfigurationWithoutJacksonTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzerTests.java

@ -17,13 +17,11 @@ @@ -17,13 +17,11 @@
package org.springframework.boot.autoconfigure.jdbc;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.diagnostics.FailureAnalysis;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.mock.env.MockEnvironment;
@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Andy Wilkinson
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions({ "h2-*.jar", "hsqldb-*.jar" })
class DataSourceBeanCreationFailureAnalyzerTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jsonb/JsonbAutoConfigurationWithNoProviderTests.java

@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.jsonb; @@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.jsonb;
import javax.json.bind.Jsonb;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("johnzon-jsonb-*.jar")
class JsonbAutoConfigurationWithNoProviderTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/Hibernate2ndLevelCacheIntegrationTests.java

@ -18,14 +18,12 @@ package org.springframework.boot.autoconfigure.orm.jpa; @@ -18,14 +18,12 @@ package org.springframework.boot.autoconfigure.orm.jpa;
import org.ehcache.jsr107.EhcacheCachingProvider;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("ehcache-2*.jar")
class Hibernate2ndLevelCacheIntegrationTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationWithoutSecurityTests.java

@ -17,12 +17,10 @@ @@ -17,12 +17,10 @@
package org.springframework.boot.autoconfigure.session;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.session.web.http.DefaultCookieSerializer;
import static org.assertj.core.api.Assertions.assertThat;
@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Vedran Pavic
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-security-*")
class SessionAutoConfigurationWithoutSecurityTests extends AbstractSessionAutoConfigurationTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationWithHibernateValidatorMissingElImplTests.java

@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.validation; @@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.validation;
import javax.validation.Validator;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
import static org.assertj.core.api.Assertions.assertThat;
@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions({ "tomcat-embed-el-*.jar", "el-api-*.jar" })
class ValidationAutoConfigurationWithHibernateValidatorMissingElImplTests {

3
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationWithoutValidatorTests.java

@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.validation; @@ -19,12 +19,10 @@ package org.springframework.boot.autoconfigure.validation;
import javax.validation.Validator;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
import static org.assertj.core.api.Assertions.assertThat;
@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("hibernate-validator-*.jar")
class ValidationAutoConfigurationWithoutValidatorTests {

3
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsEmbeddedDataSourceAutoConfigurationTests.java

@ -22,11 +22,9 @@ import java.sql.Statement; @@ -22,11 +22,9 @@ import java.sql.Statement;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.ConfigurableApplicationContext;
import static org.mockito.Mockito.never;
@ -37,7 +35,6 @@ import static org.mockito.Mockito.verify; @@ -37,7 +35,6 @@ import static org.mockito.Mockito.verify;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("HikariCP-*.jar")
class DevToolsEmbeddedDataSourceAutoConfigurationTests extends AbstractDevToolsDataSourceAutoConfigurationTests {

3
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/orm/jpa/TestDatabaseAutoConfigurationNoEmbeddedTests.java

@ -19,14 +19,12 @@ package org.springframework.boot.test.autoconfigure.orm.jpa; @@ -19,14 +19,12 @@ package org.springframework.boot.test.autoconfigure.orm.jpa;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -40,7 +38,6 @@ import static org.mockito.Mockito.mock; @@ -40,7 +38,6 @@ import static org.mockito.Mockito.mock;
* @author Stephane Nicoll
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions({ "h2-*.jar", "hsqldb-*.jar", "derby-*.jar" })
class TestDatabaseAutoConfigurationNoEmbeddedTests {

3
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTestWithoutJacksonIntegrationTests.java

@ -17,11 +17,9 @@ @@ -17,11 +17,9 @@
package org.springframework.boot.test.autoconfigure.web.client;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.http.MediaType;
import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.util.ClassUtils;
@ -35,7 +33,6 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat @@ -35,7 +33,6 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("jackson-*.jar")
@RestClientTest(ExampleRestClient.class)
class RestClientTestWithoutJacksonIntegrationTests {

2
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactoryTests.java

@ -21,7 +21,6 @@ import org.junit.jupiter.api.Test; @@ -21,7 +21,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.testsupport.runner.classpath.ClassPathOverrides;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.boot.testsupport.system.CapturedOutput;
import org.springframework.boot.testsupport.system.OutputCaptureExtension;
@ -32,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ExtendWith(OutputCaptureExtension.class)
@ClassPathOverrides("org.json:json:20140107")
class DuplicateJsonObjectContextCustomizerFactoryTests {

6
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ClassPathExclusions.java

@ -23,9 +23,10 @@ import java.lang.annotation.Retention; @@ -23,9 +23,10 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.extension.ExtendWith;
/**
* Annotation used in combination with {@link ModifiedClassPathExtension} to exclude
* entries from the classpath.
* Annotation used to exclude entries from the classpath.
*
* @author Andy Wilkinson
* @since 1.5.0
@ -33,6 +34,7 @@ import java.lang.annotation.Target; @@ -33,6 +34,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@ExtendWith(ModifiedClassPathExtension.class)
public @interface ClassPathExclusions {
/**

6
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ClassPathOverrides.java

@ -22,9 +22,10 @@ import java.lang.annotation.Retention; @@ -22,9 +22,10 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.extension.ExtendWith;
/**
* Annotation used in combination with {@link ModifiedClassPathExtension} to override
* entries on the classpath.
* Annotation used to override entries on the classpath.
*
* @author Andy Wilkinson
* @since 1.5.0
@ -32,6 +33,7 @@ import java.lang.annotation.Target; @@ -32,6 +33,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@ExtendWith(ModifiedClassPathExtension.class)
public @interface ClassPathOverrides {
/**

3
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathExtension.java

@ -41,9 +41,8 @@ import org.springframework.util.ReflectionUtils; @@ -41,9 +41,8 @@ import org.springframework.util.ReflectionUtils;
* test class and as the thread context class loader while the test is being run.
*
* @author Christoph Dreis
* @since 2.2.0
*/
public class ModifiedClassPathExtension implements InvocationInterceptor {
class ModifiedClassPathExtension implements InvocationInterceptor {
@Override
public void interceptBeforeAllMethod(Invocation<Void> invocation,

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathExtensionExclusionsTests.java

@ -18,7 +18,6 @@ package org.springframework.boot.testsupport.runner.classpath; @@ -18,7 +18,6 @@ package org.springframework.boot.testsupport.runner.classpath;
import org.hamcrest.Matcher;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.isA;
@ -28,7 +27,6 @@ import static org.hamcrest.Matchers.isA; @@ -28,7 +27,6 @@ import static org.hamcrest.Matchers.isA;
*
* @author Christoph Dreis
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("hibernate-validator-*.jar")
class ModifiedClassPathExtensionExclusionsTests {

2
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/runner/classpath/ModifiedClassPathExtensionOverridesTests.java

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
package org.springframework.boot.testsupport.runner.classpath;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.context.ApplicationContext;
import org.springframework.util.StringUtils;
@ -29,7 +28,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -29,7 +28,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Christoph Dreis
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathOverrides("org.springframework:spring-context:4.1.0.RELEASE")
class ModifiedClassPathExtensionOverridesTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationNoWebTests.java

@ -17,10 +17,8 @@ @@ -17,10 +17,8 @@
package org.springframework.boot;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.StaticApplicationContext;
@ -32,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-web*.jar")
class SpringApplicationNoWebTests {

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java

@ -56,7 +56,6 @@ import org.springframework.boot.logging.LoggingSystemProperties; @@ -56,7 +56,6 @@ import org.springframework.boot.logging.LoggingSystemProperties;
import org.springframework.boot.logging.java.JavaLoggingSystem;
import org.springframework.boot.system.ApplicationPid;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.boot.testsupport.system.CapturedOutput;
import org.springframework.boot.testsupport.system.OutputCaptureExtension;
import org.springframework.context.ApplicationEvent;
@ -84,7 +83,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; @@ -84,7 +83,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* @author Ben Hale
* @author Fahim Farook
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ExtendWith(OutputCaptureExtension.class)
@ClassPathExclusions("log4j*.jar")
class LoggingApplicationListenerTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoSuchMethodFailureAnalyzerTests.java

@ -20,11 +20,9 @@ import javax.servlet.ServletContext; @@ -20,11 +20,9 @@ import javax.servlet.ServletContext;
import javax.servlet.http.HttpServlet;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.diagnostics.FailureAnalysis;
import org.springframework.boot.testsupport.runner.classpath.ClassPathOverrides;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@ -34,7 +32,6 @@ import static org.mockito.Mockito.mock; @@ -34,7 +32,6 @@ import static org.mockito.Mockito.mock;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathOverrides("javax.servlet:servlet-api:2.5")
class NoSuchMethodFailureAnalyzerTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/ValidationExceptionFailureAnalyzerTests.java

@ -17,12 +17,10 @@ @@ -17,12 +17,10 @@
package org.springframework.boot.diagnostics.analyzer;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.validation.annotation.Validated;
@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*
* @author Andy Wilkinson
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("hibernate-validator-*.jar")
class ValidationExceptionFailureAnalyzerTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/NoSnakeYamlPropertySourceLoaderTests.java vendored

@ -17,10 +17,8 @@ @@ -17,10 +17,8 @@
package org.springframework.boot.env;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.core.io.ByteArrayResource;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
@ -30,7 +28,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; @@ -30,7 +28,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
*
* @author Madhura Bhave
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("snakeyaml-*.jar")
class NoSnakeYamlPropertySourceLoaderTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceUnwrapperNoSpringJdbcTests.java

@ -21,11 +21,9 @@ import javax.sql.DataSource; @@ -21,11 +21,9 @@ import javax.sql.DataSource;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.tomcat.jdbc.pool.DataSourceProxy;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("spring-jdbc-*.jar")
class DataSourceUnwrapperNoSpringJdbcTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/validation/MessageInterpolatorFactoryWithoutElIntegrationTests.java

@ -22,10 +22,8 @@ import javax.validation.ValidationException; @@ -22,10 +22,8 @@ import javax.validation.ValidationException;
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -35,7 +33,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*
* @author Phillip Webb
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("tomcat-embed-el-*.jar")
class MessageInterpolatorFactoryWithoutElIntegrationTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/HttpWebServiceMessageSenderBuilderOkHttp3IntegrationTests.java

@ -20,10 +20,8 @@ import java.time.Duration; @@ -20,10 +20,8 @@ import java.time.Duration;
import okhttp3.OkHttpClient;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.test.util.ReflectionTestUtils;
@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions("httpclient-*.jar")
class HttpWebServiceMessageSenderBuilderOkHttp3IntegrationTests {

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/HttpWebServiceMessageSenderBuilderSimpleIntegrationTests.java

@ -19,10 +19,8 @@ package org.springframework.boot.webservices.client; @@ -19,10 +19,8 @@ package org.springframework.boot.webservices.client;
import java.time.Duration;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathExtension;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.ws.transport.WebServiceMessageSender;
@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Stephane Nicoll
*/
@ExtendWith(ModifiedClassPathExtension.class)
@ClassPathExclusions({ "httpclient-*.jar", "okhttp*.jar" })
class HttpWebServiceMessageSenderBuilderSimpleIntegrationTests {

Loading…
Cancel
Save