Skip to content

Commit

Permalink
Fix failing tests on older versions of Neo4j.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-simons committed Sep 14, 2020
1 parent dbd9c41 commit 6db44da
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@ public void shouldBeAbleToIndicateSafeCall() throws NoSuchFieldException, Illega
mappingContextField.setAccessible(true);
mappingContextField.set(session, spyOnMappingContext);

Iterable<String> functionNames = session
.query(String.class, "CALL dbms.functions() yield name", Collections.emptyMap());
assertThat(functionNames).isNotEmpty();
functionNames = session
.query(String.class, "CALL dbms.functions() yield name /*+ OGM READ_ONLY */", Collections.emptyMap());
assertThat(functionNames).isNotEmpty();
functionNames = session
.query(String.class, "CALL dbms.functions() yield name \n/*+ OGM READ_ONLY */", Collections.emptyMap());
assertThat(functionNames).isNotEmpty();
functionNames = session
.query(String.class, "CALL /*+ OGM READ_ONLY */ dbms.functions() yield name", Collections.emptyMap());
assertThat(functionNames).isNotEmpty();
Iterable<String> results = session
.query(String.class, "CALL dbms.procedures() yield name", Collections.emptyMap());
assertThat(results).isNotEmpty();
results = session
.query(String.class, "CALL dbms.procedures() yield name /*+ OGM READ_ONLY */", Collections.emptyMap());
assertThat(results).isNotEmpty();
results = session
.query(String.class, "CALL dbms.procedures() yield name \n/*+ OGM READ_ONLY */", Collections.emptyMap());
assertThat(results).isNotEmpty();
results = session
.query(String.class, "CALL /*+ OGM READ_ONLY */ dbms.procedures() yield name", Collections.emptyMap());
assertThat(results).isNotEmpty();

Mockito.verify(spyOnMappingContext, Mockito.atMost(1)).clear();
}
Expand Down

0 comments on commit 6db44da

Please sign in to comment.