From 19039a3d2e80b983b54f41ec6dc275d4b0b21d9a Mon Sep 17 00:00:00 2001 From: n Date: Thu, 15 Jun 2023 20:37:20 +0300 Subject: [PATCH] Revert "JAVA-20167 Additional changes for test MovieRepositoryIntegrationTest" This reverts commit 2a4950a9d74ae6334e6059d3dca4c6535315f99b. --- .gitignore | 5 +---- persistence-modules/spring-data-neo4j/pom.xml | 4 +--- .../data/neo4j/MovieRepositoryIntegrationTest.java | 12 ++++-------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index f124a385d4..7725bf202e 100644 --- a/.gitignore +++ b/.gitignore @@ -120,7 +120,4 @@ libraries-2/src/test/resources/crawler4j/** devDb*.db #jaxb -*.xjb - -#spring-data-neo4j -persistence-modules/spring-data-neo4j/data/** \ No newline at end of file +*.xjb \ 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 75d0aefc23..a2fa29e753 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 - ${neo4j.version} + 5.5.0 test @@ -129,8 +129,6 @@ 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 5af501c900..1878eb12b6 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,7 +13,6 @@ 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; @@ -33,10 +32,10 @@ import java.util.*; class MovieRepositoryIntegrationTest { @Autowired - private MovieRepository movieRepository; + private static MovieRepository movieRepository; @Autowired - private PersonRepository personRepository; + private static PersonRepository personRepository; public MovieRepositoryIntegrationTest() { } @@ -44,14 +43,11 @@ class MovieRepositoryIntegrationTest { private static Neo4j embeddedDatabaseServer; @BeforeAll - static void setup() { + static void initializeNeo4j() { + embeddedDatabaseServer = Neo4jBuilders.newInProcessBuilder() .withDisabledServer() .build(); - } - - @BeforeEach - void initializeNeo4j() { System.out.println("seeding embedded database"); Movie italianJob = new Movie();