Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 01719f1

Browse files
Updated test cypherWithProfileWithMemory to include details column and fixed imports
1 parent 4c66ff3 commit 01719f1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cypher-shell/src/integration-test/java/org/neo4j/shell/commands/CypherShellVerboseIntegrationTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.neo4j.shell.prettyprint.TablePlanFormatter;
1717

1818
import static org.hamcrest.CoreMatchers.containsString;
19-
import static org.hamcrest.CoreMatchers.equalTo;
2019
import static org.hamcrest.CoreMatchers.not;
2120
import static org.hamcrest.MatcherAssert.assertThat;
2221
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@@ -207,7 +206,7 @@ public void cypherWithOrder() throws CommandException {
207206
public void cypherWithQueryDetails() throws CommandException {
208207
// given
209208
String serverVersion = shell.getServerVersion();
210-
assumeTrue((minorVersion(serverVersion) > 0 && majorVersion(serverVersion) == 4) || majorVersion(serverVersion) > 4);
209+
assumeThat( version(serverVersion), greaterThanOrEqualTo(version("4.1")));
211210

212211
//when
213212
shell.execute("EXPLAIN MATCH (n) with n.age AS age RETURN age");
@@ -223,7 +222,7 @@ public void cypherWithQueryDetails() throws CommandException {
223222
public void cypherWithoutQueryDetails() throws CommandException {
224223
// given
225224
String serverVersion = shell.getServerVersion();
226-
assumeTrue((minorVersion(serverVersion) == 0 && majorVersion(serverVersion) == 4) || majorVersion(serverVersion) < 4);
225+
assumeThat( version(serverVersion), not(greaterThanOrEqualTo(version("4.1"))));
227226

228227
//when
229228
shell.execute("EXPLAIN MATCH (n) with n.age AS age RETURN age");
@@ -264,7 +263,7 @@ public void cypherWithProfileWithMemory() throws CommandException {
264263
//then
265264
String actual = linePrinter.output();
266265
assertThat(actual, containsString("| Plan | Statement | Version | Planner | Runtime | Time | DbHits | Rows | Memory (Bytes) |")); // First table
267-
assertThat(actual, containsString("| Operator | Estimated Rows | Rows | DB Hits | Cache H/M | Memory (Bytes) | Identifiers |")); // Second table
266+
assertThat(actual, containsString("| Operator | Details | Estimated Rows | Rows | DB Hits | Cache H/M | Memory (Bytes) |")); // Second table
268267
}
269268

270269
@Test

cypher-shell/src/main/java/org/neo4j/shell/prettyprint/TablePlanFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class TablePlanFormatter {
3838
private static final String TIME = "Time (ms)";
3939
private static final String ORDER = "Ordered by";
4040
private static final String MEMORY = "Memory (Bytes)";
41-
private static final String IDENTIFIERS = "Identifiers";
41+
public static final String IDENTIFIERS = "Identifiers";
4242
private static final String OTHER = "Other";
4343
public static final String DETAILS = "Details";
4444
private static final String SEPARATOR = ", ";

0 commit comments

Comments
 (0)