From 0205b875a03cbd500965ac3b929698f765175fa7 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 29 Sep 2023 15:13:58 +0100 Subject: [PATCH] Polish --- .../TransactionAutoConfigurationTests.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java index f8f17332db..1af0a11519 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java @@ -26,9 +26,7 @@ import org.springframework.boot.LazyInitializationExcludeFilter; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; -import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener; import org.springframework.boot.jdbc.DataSourceBuilder; -import org.springframework.boot.logging.LogLevel; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.Bean; @@ -184,12 +182,10 @@ class TransactionAutoConfigurationTests { @Test void excludesAbstractTransactionAspectFromLazyInit() { - this.contextRunner.withUserConfiguration(AspectJTransactionManagementConfiguration.class) - .withInitializer(new ConditionEvaluationReportLoggingListener(LogLevel.INFO)) - .run((context) -> { - LazyInitializationExcludeFilter filter = context.getBean(LazyInitializationExcludeFilter.class); - assertThat(filter.isExcluded(null, null, AbstractTransactionAspect.class)).isTrue(); - }); + this.contextRunner.withUserConfiguration(AspectJTransactionManagementConfiguration.class).run((context) -> { + LazyInitializationExcludeFilter filter = context.getBean(LazyInitializationExcludeFilter.class); + assertThat(filter.isExcluded(null, null, AbstractTransactionAspect.class)).isTrue(); + }); } @Configuration