You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/08/22 20:36:56 UTC

tinkerpop git commit: if property id is number, coerce to Long else use the id. CTR.

Repository: tinkerpop
Updated Branches:
  refs/heads/tp31 5fcaeef54 -> 6745b31dd


if property id is number, coerce to Long else use the id. CTR.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6745b31d
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6745b31d
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6745b31d

Branch: refs/heads/tp31
Commit: 6745b31dd8f3ad65c405332289d86b98ead4090c
Parents: 5fcaeef
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Aug 22 14:36:51 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Aug 22 14:36:51 2016 -0600

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/map/PropertiesTest.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6745b31d/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
index 95f57a6..b5b4310 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
@@ -98,12 +98,14 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
             keys.add(vertexProperty.key());
             values.add(vertexProperty.value());
             ids.add(vertexProperty.id());
+            Object id = vertexProperty.id();
+            id = id instanceof Number ? ((Number) id).longValue() : id;
+            Object otherId = convertToVertex(graph, vertexProperty.value()).property("name").id();
+            otherId = otherId instanceof Number ? ((Number) otherId).longValue() : otherId;
+            assertEquals(otherId, id);
             assertEquals("name", vertexProperty.key());
             assertEquals(convertToVertex(graph, vertexProperty.value()).values("name").next(), vertexProperty.value());
             assertEquals(convertToVertex(graph, vertexProperty.value()).value("name"), vertexProperty.value());
-            assertEquals(convertToVertex(graph, vertexProperty.value()).properties("name").next().id(), vertexProperty.id());
-            assertEquals(convertToVertex(graph, vertexProperty.value()).property("name").id(), vertexProperty.id());
-            assertEquals(convertToVertexId(vertexProperty.value()), vertexProperty.element().id());
         }
         assertEquals(4, counter);
         assertEquals(1, keys.size());
@@ -114,7 +116,6 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
         assertTrue(values.contains("josh"));
         assertTrue(values.contains("peter"));
         assertEquals(4, ids.size());
-
     }
 
     public static class Traversals extends PropertiesTest {