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 2015/05/29 20:43:23 UTC

[20/31] incubator-tinkerpop git commit: Fixed test to ensure a VertexProperty with an endTime was selected.

Fixed test to ensure a VertexProperty with an endTime was selected.

Without this adjustment, the test will randomly work as a graph could return a VertexProperty without an endTime and when that property is asserted it will fail.


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

Branch: refs/heads/master
Commit: 1f9a69eb8cf2c0f788609e0cf7c7455551f8f968
Parents: d2fd291
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 29 08:42:20 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 29 08:42:20 2015 -0400

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/structure/io/IoTest.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f9a69eb/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
index ae4b32d..3ed7e54 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
@@ -1798,7 +1798,9 @@ public class IoTest extends AbstractGremlinTest {
     public void shouldReadWriteVertexPropertyWithMetaPropertiesGraphSON() throws Exception {
         try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
             final GraphSONWriter writer = graph.io(graphson).writer().create();
-            final VertexProperty p = g.V(convertToVertexId("marko")).next().properties("location").next();
+
+            // select any vertexproperty that has both start/end time
+            final VertexProperty p = (VertexProperty) g.V(convertToVertexId("marko")).properties("location").as("p").has("endTime").select("p").next();
             writer.writeVertexProperty(os, p);
 
             final AtomicBoolean called = new AtomicBoolean(false);
@@ -1871,7 +1873,9 @@ public class IoTest extends AbstractGremlinTest {
     public void shouldReadWriteVertexPropertyWithMetaPropertiesGryo() throws Exception {
         try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
             final GryoWriter writer = graph.io(gryo).writer().create();
-            final VertexProperty p = g.V(convertToVertexId("marko")).next().properties("location").next();
+
+            // select any vertexproperty that has both start/end time
+            final VertexProperty p = (VertexProperty) g.V(convertToVertexId("marko")).properties("location").as("p").has("endTime").select("p").next();
             writer.writeVertexProperty(os, p);
 
             final AtomicBoolean called = new AtomicBoolean(false);