You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/11/30 16:06:01 UTC

[1/3] incubator-tinkerpop git commit: Removed mixed typing in VertexPropertyTest

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 05f4f2b62 -> 27d82539e


Removed mixed typing in VertexPropertyTest

Converted integer value to string to maintain type


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

Branch: refs/heads/master
Commit: fd95dc8b62c02f73c9de8da31fb7a200efe2929a
Parents: 0c20c6d
Author: Nghia Tran <ng...@gmail.com>
Authored: Tue Nov 24 19:53:45 2015 -0500
Committer: Nghia Tran <ng...@gmail.com>
Committed: Tue Nov 24 19:53:45 2015 -0500

----------------------------------------------------------------------
 .../gremlin/structure/VertexPropertyTest.java         | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/fd95dc8b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
index edb4d8f..c7f7749 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
@@ -23,22 +23,22 @@ import org.apache.tinkerpop.gremlin.ExceptionCoverage;
 import org.apache.tinkerpop.gremlin.FeatureRequirement;
 import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
 import org.apache.tinkerpop.gremlin.process.traversal.P;
-import org.apache.tinkerpop.gremlin.util.function.FunctionUtils;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.junit.Test;
 import org.junit.experimental.runners.Enclosed;
 import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
 
-import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
-import java.util.function.Consumer;
 
 import static org.hamcrest.Matchers.hasItem;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -446,7 +446,7 @@ public class VertexPropertyTest extends AbstractGremlinTest {
             });
 
             for (int i = 0; i < 100; i++) {
-                marko.property(VertexProperty.Cardinality.list, "name", i);
+                marko.property(VertexProperty.Cardinality.list, "name", "Remove-" + String.valueOf(i));
             }
             tryCommit(graph, graph -> {
                 assertVertexEdgeCounts(1, 0);
@@ -455,7 +455,7 @@ public class VertexPropertyTest extends AbstractGremlinTest {
                 assertEquals(0, IteratorUtils.count(marko.properties("blah")));
             });
 
-            g.V().properties("name").has(T.value, P.test((a, b) -> ((Class) b).isAssignableFrom(a.getClass()), Integer.class)).forEachRemaining(Property::remove);
+            g.V().properties("name").has(T.value, P.test((a, b) -> ((String) a).startsWith((String) b), "Remove-")).forEachRemaining(Property::remove);
             tryCommit(graph, graph -> {
                 assertVertexEdgeCounts(1, 0);
                 assertEquals(2, IteratorUtils.count(marko.properties("name")));


[3/3] incubator-tinkerpop git commit: Merge branch 'TINKERPOP3-990' of https://github.com/n-tran/incubator-tinkerpop

Posted by sp...@apache.org.
Merge branch 'TINKERPOP3-990' of https://github.com/n-tran/incubator-tinkerpop


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

Branch: refs/heads/master
Commit: 27d82539e7d621ed05978398cb708f71bd9800ec
Parents: 05f4f2b 7626967
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Nov 30 09:54:27 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Nov 30 09:54:27 2015 -0500

----------------------------------------------------------------------
 .../traversal/step/map/GroovyAddEdgeTest.groovy       |  4 ++--
 .../process/traversal/step/map/AddEdgeTest.java       |  8 ++++----
 .../gremlin/structure/VertexPropertyTest.java         | 14 +++++++-------
 3 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------



[2/3] incubator-tinkerpop git commit: Converted int to double for tests consistency reasons.

Posted by sp...@apache.org.
Converted int to double for tests consistency reasons.


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

Branch: refs/heads/master
Commit: 7626967d01309b3732345ee7d9532e8a5677c647
Parents: fd95dc8
Author: Nghia Tran <ng...@gmail.com>
Authored: Fri Nov 27 16:32:42 2015 -0500
Committer: Nghia Tran <ng...@gmail.com>
Committed: Fri Nov 27 16:32:42 2015 -0500

----------------------------------------------------------------------
 .../process/traversal/step/map/GroovyAddEdgeTest.groovy      | 4 ++--
 .../gremlin/process/traversal/step/map/AddEdgeTest.java      | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7626967d/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddEdgeTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddEdgeTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddEdgeTest.groovy
index 176e731..eb78aa2 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddEdgeTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddEdgeTest.groovy
@@ -38,7 +38,7 @@ public abstract class GroovyAddEdgeTest {
         @Override
         public Traversal<Vertex, Edge> get_g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X(
                 final Object v1Id) {
-            TraversalScriptHelper.compute("g.V(v1Id).as('a').out('created').addE('createdBy').to('a').property('weight', 2)", g, "v1Id", v1Id)
+            TraversalScriptHelper.compute("g.V(v1Id).as('a').out('created').addE('createdBy').to('a').property('weight', 2.0d)", g, "v1Id", v1Id)
         }
 
         @Override
@@ -64,7 +64,7 @@ public abstract class GroovyAddEdgeTest {
         @Override
         public Traversal<Vertex, Edge> get_g_VX1X_asXaX_outXcreatedX_addOutEXcreatedBy_a_weight_2X(
                 final Object v1Id) {
-            TraversalScriptHelper.compute("g.V(v1Id).as('a').out('created').addOutE('createdBy', 'a', 'weight', 2)", g, "v1Id", v1Id)
+            TraversalScriptHelper.compute("g.V(v1Id).as('a').out('created').addOutE('createdBy', 'a', 'weight', 2.0d)", g, "v1Id", v1Id)
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7626967d/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeTest.java
index f3cb90f..9bd6695 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeTest.java
@@ -121,7 +121,7 @@ public abstract class AddEdgeTest extends AbstractGremlinProcessTest {
         while (traversal.hasNext()) {
             final Edge edge = traversal.next();
             assertEquals("createdBy", edge.label());
-            assertEquals(2, edge.<Integer>value("weight").intValue());
+            assertEquals(2.0d, edge.<Double>value("weight").doubleValue(),0.00001d);
             assertEquals(1, IteratorUtils.count(edge.properties()));
             count++;
 
@@ -142,7 +142,7 @@ public abstract class AddEdgeTest extends AbstractGremlinProcessTest {
         while (traversal.hasNext()) {
             final Edge edge = traversal.next();
             assertEquals("createdBy", edge.label());
-            assertEquals(2, edge.<Integer>value("weight").intValue());
+            assertEquals(2.0d, edge.<Double>value("weight").doubleValue(),0.00001d);
             assertEquals(1, IteratorUtils.count(edge.properties()));
             count++;
 
@@ -311,7 +311,7 @@ public abstract class AddEdgeTest extends AbstractGremlinProcessTest {
 
         @Override
         public Traversal<Vertex, Edge> get_g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X(final Object v1Id) {
-            return g.V(v1Id).as("a").out("created").addE("createdBy").to("a").property("weight", 2);
+            return g.V(v1Id).as("a").out("created").addE("createdBy").to("a").property("weight", 2.0d);
         }
 
         @Override
@@ -338,7 +338,7 @@ public abstract class AddEdgeTest extends AbstractGremlinProcessTest {
 
         @Override
         public Traversal<Vertex, Edge> get_g_VX1X_asXaX_outXcreatedX_addOutEXcreatedBy_a_weight_2X(final Object v1Id) {
-            return g.V(v1Id).as("a").out("created").addOutE("createdBy", "a", "weight", 2);
+            return g.V(v1Id).as("a").out("created").addOutE("createdBy", "a", "weight", 2.0d);
         }
 
         @Override