diff --git a/.gitignore b/.gitignore index 7725bf202e..f124a385d4 100644 --- a/.gitignore +++ b/.gitignore @@ -120,4 +120,7 @@ libraries-2/src/test/resources/crawler4j/** devDb*.db #jaxb -*.xjb \ No newline at end of file +*.xjb + +#spring-data-neo4j +persistence-modules/spring-data-neo4j/data/** \ No newline at end of file diff --git a/persistence-modules/spring-data-neo4j/pom.xml b/persistence-modules/spring-data-neo4j/pom.xml index a2fa29e753..75d0aefc23 100644 --- a/persistence-modules/spring-data-neo4j/pom.xml +++ b/persistence-modules/spring-data-neo4j/pom.xml @@ -108,7 +108,7 @@ org.neo4j.test neo4j-harness - 5.5.0 + ${neo4j.version} test @@ -129,6 +129,8 @@ 4.0.4 4.0.9 3.2.39 + 2.0.7 + 1.4.7 \ No newline at end of file diff --git a/persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/spring/data/neo4j/MovieRepositoryIntegrationTest.java b/persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/spring/data/neo4j/MovieRepositoryIntegrationTest.java index 1878eb12b6..5af501c900 100644 --- a/persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/spring/data/neo4j/MovieRepositoryIntegrationTest.java +++ b/persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/spring/data/neo4j/MovieRepositoryIntegrationTest.java @@ -13,6 +13,7 @@ import com.baeldung.spring.data.neo4j.repository.PersonRepository; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.neo4j.harness.Neo4j; import org.neo4j.harness.Neo4jBuilders; @@ -32,10 +33,10 @@ import java.util.*; class MovieRepositoryIntegrationTest { @Autowired - private static MovieRepository movieRepository; + private MovieRepository movieRepository; @Autowired - private static PersonRepository personRepository; + private PersonRepository personRepository; public MovieRepositoryIntegrationTest() { } @@ -43,11 +44,14 @@ class MovieRepositoryIntegrationTest { private static Neo4j embeddedDatabaseServer; @BeforeAll - static void initializeNeo4j() { - + static void setup() { embeddedDatabaseServer = Neo4jBuilders.newInProcessBuilder() .withDisabledServer() .build(); + } + + @BeforeEach + void initializeNeo4j() { System.out.println("seeding embedded database"); Movie italianJob = new Movie();