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/03/09 21:24:01 UTC
incubator-tinkerpop git commit: ParittionStrategyTest done.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/newapi 94cb9d0ea -> 358ab0832
ParittionStrategyTest done.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/358ab083
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/358ab083
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/358ab083
Branch: refs/heads/newapi
Commit: 358ab08324c1570dcf17d3ed427f9e1a350aea24
Parents: 94cb9d0
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Mar 9 14:23:58 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Mar 9 14:23:58 2015 -0600
----------------------------------------------------------------------
.../structure/strategy/PartitionStrategyTest.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/358ab083/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/PartitionStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/PartitionStrategyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/PartitionStrategyTest.java
index 5fe2303..cde0157 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/PartitionStrategyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/PartitionStrategyTest.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import org.junit.Test;
import java.util.NoSuchElementException;
@@ -58,8 +59,8 @@ public class PartitionStrategyTest extends AbstractGremlinTest {
assertNotNull(v);
assertEquals("thing", v.property("any").value());
assertFalse(v.property(partition).isPresent());
- assertFalse(v.iterators().propertyIterator(partition).hasNext());
- assertFalse(v.iterators().valueIterator(partition).hasNext());
+ assertFalse(v.properties(partition).hasNext());
+ assertFalse(v.values(partition).hasNext());
assertFalse(v.keys().contains(partition));
assertEquals("A", ((StrategyVertex) v).getBaseVertex().property(partition).value());
}
@@ -96,8 +97,8 @@ public class PartitionStrategyTest extends AbstractGremlinTest {
assertEquals("thing", e.property("every").value());
assertEquals("connectsTo", e.label());
assertFalse(e.property(partition).isPresent());
- assertFalse(e.iterators().propertyIterator(partition).hasNext());
- assertFalse(e.iterators().valueIterator(partition).hasNext());
+ assertFalse(e.properties(partition).hasNext());
+ assertFalse(e.values(partition).hasNext());
assertFalse(e.keys().contains(partition));
assertEquals("A", ((StrategyEdge) e).getBaseEdge().property(partition).value());
}
@@ -207,10 +208,10 @@ public class PartitionStrategyTest extends AbstractGremlinTest {
assertEquals(vAA.id(), g.V(vA.id()).out().next().id());
final Vertex vA1 = g.V(vA.id()).next();
- assertEquals(new Long(1), vA1.outE().count().next());
- assertEquals(eAtoAA.id(), vA1.outE().next().id());
- assertEquals(new Long(1), vA1.out().count().next());
- assertEquals(vAA.id(), vA1.out().next().id());
+ assertEquals(1, IteratorUtils.count(vA1.edges(Direction.OUT)));
+ assertEquals(eAtoAA.id(), vA1.edges(Direction.OUT).next().id());
+ assertEquals(1, IteratorUtils.count(vA1.vertices(Direction.OUT)));
+ assertEquals(vAA.id(), vA1.vertices(Direction.OUT).next().id());
strategy.addReadPartition("B");
assertEquals(new Long(3), g.V().count().next());