Skip to content

Commit b95cccb

Browse files
committed
changed constraint syntax
1 parent c66ed5f commit b95cccb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/test/java/apoc/export/csv/ImportCsvTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import static org.junit.Assert.assertTrue;
5454
import static org.neo4j.configuration.GraphDatabaseSettings.TransactionStateMemoryAllocation.OFF_HEAP;
5555
import static org.neo4j.configuration.SettingValueParsers.BYTES;
56+
import static org.junit.Assert.fail;
5657

5758
public class ImportCsvTest {
5859
public static final String BASE_URL_FILES = "src/test/resources/csv-inputs";
@@ -236,7 +237,7 @@ private void testSkipLine(long skipLine, int nodes) {
236237
@Test
237238
public void issue2826WithImportCsv() {
238239
db.executeTransactionally("CREATE (n:Person {name: 'John'})");
239-
db.executeTransactionally("CREATE CONSTRAINT unique_person ON (n:Person) ASSERT n.name IS UNIQUE");
240+
db.executeTransactionally("CREATE CONSTRAINT unique_person FOR (n:Person) REQUIRE n.name IS UNIQUE");
240241
try {
241242
TestUtil.testCall(db,
242243
"CALL apoc.import.csv([{fileName: $file, labels: ['Person']}], [], $config)",

core/src/test/java/apoc/export/graphml/ExportGraphMLTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public void testImportGraphMLWithEdgeWithoutDataKeys() throws Exception {
285285
@Test
286286
public void issue2797WithImportGraphMl() {
287287
db.executeTransactionally("CREATE (n:FOO {name: 'foo'})");
288-
db.executeTransactionally("CREATE CONSTRAINT unique_foo ON (n:FOO) ASSERT n.name IS UNIQUE");
288+
db.executeTransactionally("CREATE CONSTRAINT unique_foo FOR (n:FOO) REQUIRE n.name IS UNIQUE");
289289
try {
290290
TestUtil.testCall(db,
291291
"CALL apoc.import.graphml($file, {readLabels:true})",

0 commit comments

Comments
 (0)