Skip to content

Commit

Permalink
GH-2728 - Make test fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
meistermeier committed May 26, 2023
1 parent db05e2e commit c9bf88a
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit c9bf88a

Please sign in to comment.