From 3242e8927122c59b9979e2e5b529d754fd6c5bfe Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 4 Mar 2019 18:28:46 +0900 Subject: [PATCH] Polish See gh-16083 --- .../data/neo4j/DataNeo4jTestIntegrationTests.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestIntegrationTests.java index b3036055cc0..9e6e7728fc3 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestIntegrationTests.java @@ -18,10 +18,7 @@ package org.springframework.boot.test.autoconfigure.data.neo4j; import org.junit.ClassRule; import org.junit.Test; -import org.junit.rules.TestRule; -import org.junit.runner.Description; import org.junit.runner.RunWith; -import org.junit.runners.model.Statement; import org.neo4j.ogm.session.Session; import org.testcontainers.containers.Neo4jContainer; @@ -50,19 +47,10 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @DataNeo4jTest public class DataNeo4jTestIntegrationTests { + @ClassRule public static SkippableContainer> neo4j = new SkippableContainer>( () -> new Neo4jContainer<>().withAdminPassword(null)); - @ClassRule - public static TestRule skippableContainer = new TestRule() { - - @Override - public Statement apply(Statement base, Description description) { - return neo4j.apply(base, description); - } - - }; - @Autowired private Session session;