-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to test different cypher versions globally #725
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,6 @@ | |
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.neo4j.configuration.GraphDatabaseInternalSettings; | ||
import org.neo4j.configuration.GraphDatabaseSettings; | ||
import org.neo4j.cypher.internal.CypherVersion; | ||
import org.neo4j.test.rule.DbmsRule; | ||
|
@@ -117,8 +116,7 @@ public class ArgumentDescriptionsTest { | |
|
||
@Rule | ||
public DbmsRule db = new ImpermanentDbmsRule() | ||
.withSetting(GraphDatabaseSettings.procedure_unrestricted, singletonList("apoc.*")) | ||
.withSetting(GraphDatabaseInternalSettings.enable_experimental_cypher_versions, true); | ||
.withSetting(GraphDatabaseSettings.procedure_unrestricted, singletonList("apoc.*")); | ||
|
||
@Before | ||
public void setUp() { | ||
|
@@ -202,9 +200,11 @@ public void teardown() { | |
|
||
@Test | ||
public void functionArgumentDescriptionsDefaultVersion() throws IOException { | ||
// TODO: When Cypher command for getting default is available use that here | ||
// for now we just force this to use the preset default | ||
assertResultAsJsonEquals( | ||
CypherVersion.Default, | ||
showFunctions(null), | ||
showFunctions(CypherVersion.Default), | ||
"/functions/cypher%s/functions.json".formatted(CypherVersion.Default), | ||
"/functions/common/functions.json"); | ||
} | ||
|
@@ -223,9 +223,11 @@ public void functionArgumentDescriptions() throws IOException { | |
|
||
@Test | ||
public void procedureArgumentDescriptionsDefaultVersion() throws IOException { | ||
// TODO: When Cypher command for getting default is available use that here | ||
// for now we just force this to use the preset default | ||
assertResultAsJsonEquals( | ||
CypherVersion.Default, | ||
showProcedures(null), | ||
showProcedures(CypherVersion.Default), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
"/procedures/cypher%s/procedures.json".formatted(CypherVersion.Default), | ||
"/procedures/common/procedures.json"); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,15 @@ | |
import org.junit.BeforeClass; | ||
import org.junit.ClassRule; | ||
import org.junit.Test; | ||
import org.neo4j.configuration.GraphDatabaseInternalSettings; | ||
import org.neo4j.configuration.GraphDatabaseSettings; | ||
import org.neo4j.graphdb.Result; | ||
import org.neo4j.test.rule.DbmsRule; | ||
import org.neo4j.test.rule.ImpermanentDbmsRule; | ||
|
||
/** | ||
* CYPHER 5 only; moved to extended for Cypher 25 | ||
*/ | ||
public class ArrowTest { | ||
|
||
private static File directory = new File("target/arrow import"); | ||
|
@@ -60,7 +64,10 @@ public class ArrowTest { | |
public static DbmsRule db = new ImpermanentDbmsRule() | ||
.withSetting( | ||
GraphDatabaseSettings.load_csv_file_url_root, | ||
directory.toPath().toAbsolutePath()); | ||
directory.toPath().toAbsolutePath()) | ||
.withSetting( | ||
GraphDatabaseInternalSettings.default_cypher_version, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This setting is being replaced by |
||
GraphDatabaseInternalSettings.CypherVersion.Cypher5); | ||
|
||
public static final List<Map<String, Object>> EXPECTED = List.of( | ||
new HashMap<>() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CypherVersion.Default
is being removed. If you really need a default one you can use: