Skip to content

Commit 27438b5

Browse files
build: Fix version sniffing during tests for newer versions of Neo4j.
Signed-off-by: Michael Simons <michael@simons.ac>
1 parent 855d84f commit 27438b5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
9898
<maven.compiler.release>${java.version}</maven.compiler.release>
9999
<neo4j-java-driver.version>5.28.5</neo4j-java-driver.version>
100-
<neo4j-migrations.version>1.13.1</neo4j-migrations.version>
100+
<neo4j-migrations.version>1.16.3</neo4j-migrations.version>
101101
<neo4j.version>4.4.8</neo4j.version>
102102
<objenesis.version>3.0.1</objenesis.version>
103103
<project.build.docs>${project.build.directory}/docs</project.build.docs>

src/test/java/org/springframework/data/neo4j/integration/imperative/CausalClusterLoadTestIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public ThingService thingService(Neo4jClient neo4jClient, ThingRepository thingR
145145
public boolean isCypher5Compatible() {
146146
try (Session session = driver().session()) {
147147
String version = session
148-
.run("CALL dbms.components() YIELD versions RETURN 'Neo4j/' + versions[0] as version")
148+
.run("CALL dbms.components() YIELD name, versions WHERE name = 'Neo4j Kernel' RETURN 'Neo4j/' + versions[0] as version")
149149
.single()
150150
.get("version").asString();
151151

src/test/java/org/springframework/data/neo4j/integration/reactive/ReactiveCausalClusterLoadTestIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public ThingService thingService(ReactiveNeo4jClient neo4jClient, ThingRepositor
152152
public boolean isCypher5Compatible() {
153153
try (Session session = driver().session()) {
154154
String version = session
155-
.run("CALL dbms.components() YIELD versions RETURN 'Neo4j/' + versions[0] as version")
155+
.run("CALL dbms.components() YIELD name, versions WHERE name = 'Neo4j Kernel' RETURN 'Neo4j/' + versions[0] as version")
156156
.single()
157157
.get("version").asString();
158158

src/test/java/org/springframework/data/neo4j/test/Neo4jExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public ServerVersion getServerVersion() {
260260
if (serverVersion == null) {
261261
String versionString = "";
262262
try (Session session = this.getDriver().session()) {
263-
Record result = session.run("CALL dbms.components() YIELD versions RETURN 'Neo4j/' + versions[0] as version").single();
263+
Record result = session.run("CALL dbms.components() YIELD name, versions WHERE name = 'Neo4j Kernel' RETURN 'Neo4j/' + versions[0] as version").single();
264264
versionString = result.get("version").asString();
265265
this.cachedServerVersion = ServerVersion.version(versionString);
266266
} catch (Exception e) {
@@ -282,7 +282,7 @@ String getEdition() {
282282
String edition;
283283
SessionConfig sessionConfig = SessionConfig.builder().withDefaultAccessMode(AccessMode.READ).build();
284284
try (Session session = getDriver().session(sessionConfig)) {
285-
edition = session.run("call dbms.components() yield edition").single().get("edition").asString();
285+
edition = session.run("CALL dbms.components() YIELD name, edition WHERE name = 'Neo4j Kernel' RETURN edition").single().get("edition").asString();
286286
}
287287
return edition.toLowerCase(Locale.ENGLISH);
288288
}

0 commit comments

Comments
 (0)