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 16:06:39 UTC

tinkerpop git commit: fixed a bug in PropertiesTest which assumed Long ids. CTR.

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


fixed a bug in PropertiesTest which assumed Long ids. CTR.


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

Branch: refs/heads/tp31
Commit: 5fcaeef54f6474ef994a58e9f2ba348256c7851c
Parents: ed418ad
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Aug 22 10:06:29 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Aug 22 10:06:29 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                             | 1 +
 .../gremlin/process/traversal/step/map/PropertiesTest.java     | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5fcaeef5/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 201d1ae..afb2a7f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.4 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Fixed a bug in `PropertiesTest` which assumed long id values.
 * Fixed a bug in `StarGraph` around self-edges.
 * Fixed a potential leak of a `ReferenceCounted` resource in Gremlin Server.
 * Renamed distributions to make the prefix "apache-tinkerpop-" as opposed to just "apache-".

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5fcaeef5/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 a886b19..95f57a6 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
@@ -100,8 +100,10 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
             ids.add(vertexProperty.id());
             assertEquals("name", vertexProperty.key());
             assertEquals(convertToVertex(graph, vertexProperty.value()).values("name").next(), vertexProperty.value());
-            // compare the ids as longs. assumes modern graph uses numeric ids only (long/integer).
-            assertEquals(Long.valueOf(convertToVertex(graph, vertexProperty.value()).properties("name").next().id().toString()), Long.valueOf(vertexProperty.id().toString()));
+            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());