Skip to content

Commit

Permalink
exclude the Neo4jTestHarness Configuration to overcome the test error.
Browse files Browse the repository at this point in the history
  • Loading branch information
hantsy committed Feb 18, 2020
1 parent a51232b commit 257e442
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
logging.level.com.example=debug
org.neo4j.driver.uri=bolt://localhost:7687
org.neo4j.driver.uri=neo4j://localhost:7687
org.neo4j.driver.authentication.username=neo4j
org.neo4j.driver.authentication.password=test
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.neo4j.driver.springframework.boot.test.autoconfigure.Neo4jTestHarnessAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.web.reactive.server.WebTestClient;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@EnableAutoConfiguration(exclude = Neo4jTestHarnessAutoConfiguration.class)
class IntegrationTests {

@LocalServerPort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.neo4j.driver.springframework.boot.test.autoconfigure.Neo4jTestHarnessAutoConfiguration;
import org.neo4j.springframework.boot.test.autoconfigure.data.DataNeo4jTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
Expand All @@ -18,7 +19,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

@DataNeo4jTest
@DataNeo4jTest(excludeAutoConfiguration = Neo4jTestHarnessAutoConfiguration.class)
@Slf4j
public class PostRepositoryTest {

Expand Down

0 comments on commit 257e442

Please sign in to comment.