Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6A0DF200D17 for ; Sun, 3 Sep 2017 02:42:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 68AC51648ED; Sun, 3 Sep 2017 00:42:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 586051648E7 for ; Sun, 3 Sep 2017 02:42:40 +0200 (CEST) Received: (qmail 29543 invoked by uid 500); 3 Sep 2017 00:42:39 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 28519 invoked by uid 99); 3 Sep 2017 00:42:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2017 00:42:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1004BF5688; Sun, 3 Sep 2017 00:42:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rdale@apache.org To: commits@tinkerpop.apache.org Date: Sun, 03 Sep 2017 00:43:20 -0000 Message-Id: <5e3a5c21f02549618ec6041834c79207@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [45/50] tinkerpop git commit: fixes for neo4j upgrade to 3.2.2 archived-at: Sun, 03 Sep 2017 00:42:44 -0000 fixes for neo4j upgrade to 3.2.2 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9c12a327 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9c12a327 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9c12a327 Branch: refs/heads/TINKERPOP-1692 Commit: 9c12a3272420f43595ea37c8dad8f9c760870bc6 Parents: 4d09fe5 Author: Michael Hunger Authored: Thu Jul 13 02:19:57 2017 +0200 Committer: Robert Dale Committed: Sat Sep 2 20:31:17 2017 -0400 ---------------------------------------------------------------------- neo4j-gremlin/pom.xml | 40 ++++++++++++++++---- .../neo4j/process/NativeNeo4jCypherCheck.java | 4 +- .../structure/NativeNeo4jStructureCheck.java | 22 +++++------ 3 files changed, 45 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9c12a327/neo4j-gremlin/pom.xml ---------------------------------------------------------------------- diff --git a/neo4j-gremlin/pom.xml b/neo4j-gremlin/pom.xml index d8ce59d..8e50985 100644 --- a/neo4j-gremlin/pom.xml +++ b/neo4j-gremlin/pom.xml @@ -89,7 +89,7 @@ limitations under the License. - org.neo4j:neo4j-tinkerpop-api-impl:0.3-2.3.3 + org.neo4j:neo4j-tinkerpop-api-impl:0.6-3.2.2 @@ -117,18 +117,30 @@ limitations under the License. org.neo4j neo4j-tinkerpop-api-impl - 0.3-2.3.3 + 0.6-3.2.2 test - com.googlecode.concurrentlinkedhashmap - concurrentlinkedhashmap-lru + org.apache.commons + commons-lang3 + + + com.github.ben-manes.caffeine + caffeine + + + org.neo4j + neo4j org.scala-lang scala-library + org.scala-lang + scala-reflect + + org.slf4j slf4j-api @@ -137,13 +149,25 @@ limitations under the License. org.scala-lang scala-library - 2.11.6 + 2.11.8 test - com.googlecode.concurrentlinkedhashmap - concurrentlinkedhashmap-lru - 1.4.2 + org.scala-lang + scala-reflect + 2.11.8 + test + + + com.github.ben-manes.caffeine + caffeine + 2.3.1 + test + + + org.neo4j + neo4j + 3.2.2 test http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9c12a327/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/NativeNeo4jCypherCheck.java ---------------------------------------------------------------------- diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/NativeNeo4jCypherCheck.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/NativeNeo4jCypherCheck.java index 7ac3d89..78448cd 100644 --- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/NativeNeo4jCypherCheck.java +++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/NativeNeo4jCypherCheck.java @@ -111,7 +111,7 @@ public class NativeNeo4jCypherCheck extends AbstractNeo4jGremlinTest { this.graph.addVertex("name", "marko", "age", 30, "color", "orange"); this.graph.tx().commit(); - final List result = this.getGraph().cypher("MATCH n WHERE id(n) IN [1,2] RETURN n").select("n").id().toList(); + final List result = this.getGraph().cypher("MATCH (n) WHERE id(n) IN [1,2] RETURN n").select("n").id().toList(); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.contains(1l)); @@ -129,7 +129,7 @@ public class NativeNeo4jCypherCheck extends AbstractNeo4jGremlinTest { final List ids = Arrays.asList(v1.id(), v2.id()); final Map m = new HashMap<>(); m.put("ids", ids); - final List result = this.getGraph().cypher("MATCH n WHERE id(n) IN {ids} RETURN n", m).select("n").id().toList(); + final List result = this.getGraph().cypher("MATCH (n) WHERE id(n) IN {ids} RETURN n", m).select("n").id().toList(); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.contains(v1.id())); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9c12a327/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureCheck.java ---------------------------------------------------------------------- diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureCheck.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureCheck.java index b2f245f..8215ad3 100644 --- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureCheck.java +++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureCheck.java @@ -197,7 +197,7 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { // assertEquals(1, b.properties("location").count().next().intValue()); assertEquals(0, g.E().count().next().intValue()); - assertEquals(4l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)")); + assertEquals(4l, this.getBaseGraph().execute("MATCH (n) RETURN COUNT(n)", null).next().get("COUNT(n)")); assertEquals(2l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)")); assertEquals(2l, this.getBaseGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)")); final AtomicInteger counter = new AtomicInteger(0); @@ -206,8 +206,8 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { counter.incrementAndGet(); }); assertEquals(2, counter.getAndSet(0)); - this.getBaseGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> { - assertEquals(VertexProperty.DEFAULT_LABEL, ((List) results.get("labels(m)")).get(0)); + this.getBaseGraph().execute("MATCH (a)-->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> { + assertEquals(true, ((List) results.get("labels(m)")).contains(VertexProperty.DEFAULT_LABEL)); counter.incrementAndGet(); }); assertEquals(2, counter.getAndSet(0)); @@ -234,7 +234,7 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { // assertEquals(1, b.properties("name").count().next().intValue()); // assertEquals(1, b.properties("location").count().next().intValue()); assertEquals(0, g.E().count().next().intValue()); - assertEquals(2l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)")); + assertEquals(2l, this.getBaseGraph().execute("MATCH (n) RETURN COUNT(n)", null).next().get("COUNT(n)")); assertEquals(0l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)")); assertEquals(1, IteratorUtils.count(a.getBaseVertex().getKeys())); @@ -250,7 +250,7 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { // assertEquals(0, a.properties().count().next().intValue()); // assertEquals(2, b.properties().count().next().intValue()); assertEquals(0, g.E().count().next().intValue()); - assertEquals(2l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)")); + assertEquals(2l, this.getBaseGraph().execute("MATCH (n) RETURN COUNT(n)", null).next().get("COUNT(n)")); assertEquals(0l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)")); assertEquals(0, IteratorUtils.count(a.getBaseVertex().getKeys())); assertEquals(2, IteratorUtils.count(b.getBaseVertex().getKeys())); @@ -265,7 +265,7 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { // assertEquals(1, b.properties("location").count().next().intValue()); assertEquals(0, g.E().count().next().intValue()); - assertEquals(3l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)")); + assertEquals(3l, this.getBaseGraph().execute("MATCH (n) RETURN COUNT(n)", null).next().get("COUNT(n)")); assertEquals(1l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)")); assertEquals(1l, this.getBaseGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)")); final AtomicInteger counter = new AtomicInteger(0); @@ -274,8 +274,8 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { counter.incrementAndGet(); }); assertEquals(1, counter.getAndSet(0)); - this.getBaseGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> { - assertEquals(VertexProperty.DEFAULT_LABEL, ((List) results.get("labels(m)")).get(0)); + this.getBaseGraph().execute("MATCH (a)-->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> { + assertEquals(true, ((List) results.get("labels(m)")).contains(VertexProperty.DEFAULT_LABEL)); counter.incrementAndGet(); }); assertEquals(1, counter.getAndSet(0)); @@ -309,7 +309,7 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { //assertEquals(1, b.properties("location").count().next().intValue()); assertEquals(0, g.E().count().next().intValue()); - assertEquals(3l, this.getBaseGraph().execute("MATCH n RETURN COUNT(n)", null).next().get("COUNT(n)")); + assertEquals(3l, this.getBaseGraph().execute("MATCH (n) RETURN COUNT(n)", null).next().get("COUNT(n)")); assertEquals(1l, this.getBaseGraph().execute("MATCH (n)-[r]->(m) RETURN COUNT(r)", null).next().get("COUNT(r)")); assertEquals(1l, this.getBaseGraph().execute("MATCH (a)-[r]->() WHERE id(a) = " + a.id() + " RETURN COUNT(r)", null).next().get("COUNT(r)")); final AtomicInteger counter = new AtomicInteger(0); @@ -318,8 +318,8 @@ public class NativeNeo4jStructureCheck extends AbstractNeo4jGremlinTest { counter.incrementAndGet(); }); assertEquals(1, counter.getAndSet(0)); - this.getBaseGraph().execute("MATCH (a)-[]->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> { - assertEquals(VertexProperty.DEFAULT_LABEL, ((List) results.get("labels(m)")).get(0)); + this.getBaseGraph().execute("MATCH (a)-->(m) WHERE id(a) = " + a.id() + " RETURN labels(m)", null).forEachRemaining(results -> { + assertEquals(true, ((List) results.get("labels(m)")).contains(VertexProperty.DEFAULT_LABEL)); counter.incrementAndGet(); }); assertEquals(1, counter.getAndSet(0));