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

Commit 9306196

Browse files
committed
Fix non-idempotent test.
Also add more info to an Exception.
1 parent ff87529 commit 9306196

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ public void cypherWithOrder() throws CommandException {
195195
String serverVersion = shell.getServerVersion();
196196
assumeTrue((minorVersion(serverVersion) == 6 && majorVersion(serverVersion) == 3) || majorVersion(serverVersion) > 3);
197197

198+
// Make sure we are creating a new NEW index
199+
try {
200+
shell.execute( "DROP INDEX ON :Person(age)" );
201+
} catch ( Exception e ) {
202+
// ignore if the index didn't exist
203+
}
204+
198205
shell.execute( "CREATE INDEX ON :Person(age)" );
199206
shell.execute( "CALL db.awaitIndexes()" );
200207

cypher-shell/src/test/java/org/neo4j/shell/test/bolt/FakeResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ static FakeResult parseStatement(@Nonnull final String statement) {
101101
return statementResult;
102102
}
103103
}
104-
throw new IllegalArgumentException("No idea how to parse this statement");
104+
throw new IllegalArgumentException("No idea how to parse this statement: " + statement);
105105
}
106106
}

0 commit comments

Comments
 (0)