From ef3b99ee511cc28545b8b5bb938fefce86e7b161 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Mon, 31 Jul 2023 13:44:36 +0200 Subject: [PATCH] Fix test declaration in Neo4jAutoConfigurationTests The test was annotated `@Bean`, must be `@Test`. See gh-36649 --- .../boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java index 0bb4a6e2501..df6821f2c5e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/neo4j/Neo4jAutoConfigurationTests.java @@ -38,7 +38,6 @@ import org.springframework.boot.autoconfigure.neo4j.Neo4jProperties.Security.Tru import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException; import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import org.springframework.context.annotation.Bean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -110,7 +109,7 @@ class Neo4jAutoConfigurationTests { this.contextRunner.run((context) -> assertThat(context).hasSingleBean(PropertiesNeo4jConnectionDetails.class)); } - @Bean + @Test void shouldUseCustomConnectionDetailsWhenDefined() { this.contextRunner.withBean(Neo4jConnectionDetails.class, () -> new Neo4jConnectionDetails() {