From c9bf88ab2c8e69d3140fb927e909f32d3159f410 Mon Sep 17 00:00:00 2001 From: Gerrit Meier Date: Fri, 26 May 2023 12:52:21 +0200 Subject: [PATCH] GH-2728 - Make test fail. --- .../Neo4jVersionDependentRelationshipSaveIT.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2728/Neo4jVersionDependentRelationshipSaveIT.java b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2728/Neo4jVersionDependentRelationshipSaveIT.java index e5a455b75..7cac78fac 100644 --- a/src/test/java/org/springframework/data/neo4j/integration/issues/gh2728/Neo4jVersionDependentRelationshipSaveIT.java +++ b/src/test/java/org/springframework/data/neo4j/integration/issues/gh2728/Neo4jVersionDependentRelationshipSaveIT.java @@ -42,9 +42,13 @@ public void testGeneratedDeprecatedIds() { TestEntityWithGeneratedDeprecatedId1 freshRetrieved = generatedDeprecatedIdRepository.findById(result.getId()).get(); Assertions.assertNotNull(result.getRelatedEntity()); - Assertions.assertNotNull(freshRetrieved.getRelatedEntity()); // FAILS! + Assertions.assertNotNull(freshRetrieved.getRelatedEntity()); } + /** + * This is a test to ensure if the fix for the failing test above will continue to work for + * assigned ids. For broader test cases please return false for isCypher5Compatible in (Reactive)RepositoryIT + */ @Test public void testAssignedIds() { TestEntityWithAssignedId2 t2 = new TestEntityWithAssignedId2("second", "v2"); @@ -55,7 +59,7 @@ public void testAssignedIds() { TestEntityWithAssignedId1 freshRetrieved = assignedIdRepository.findById(result.getAssignedId()).get(); Assertions.assertNotNull(result.getRelatedEntity()); - Assertions.assertNotNull(freshRetrieved.getRelatedEntity()); // FAILS! + Assertions.assertNotNull(freshRetrieved.getRelatedEntity()); } @Configuration @@ -90,8 +94,12 @@ public PlatformTransactionManager transactionManager(Driver driver, @Override public boolean isCypher5Compatible() { - return neo4jConnectionSupport.isCypher5SyntaxCompatible(); -// return false; // explicitly not compatible with Neo4j 5 although connected to one + // default for our tests + // return neo4jConnectionSupport.isCypher5SyntaxCompatible(); + + // explicitly not compatible with Neo4j 5 although connected to one + // same as default Cypher-DSL configuration / dialect + return false; } }