tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [16/46] tinkerpop git commit: TINKERPOP-1691 Changed semantics of EventStrategyProcessTest
Date Wed, 28 Jun 2017 19:14:47 GMT
TINKERPOP-1691 Changed semantics of EventStrategyProcessTest

Tests no longer assume that element state is sync'd in memory.


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

Branch: refs/heads/TINKERPOP-1489
Commit: 3035af1e18cc29454bbfa6481e77aea41aa8153b
Parents: 116205e
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Tue Jun 20 11:38:44 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Jun 22 19:13:41 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../decoration/EventStrategyProcessTest.java    | 28 ++++++++++----------
 2 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3035af1e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0bc2c6b..fcc97bc 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -30,6 +30,7 @@ This release also includes changes from <<release-3-1-8, 3.1.8>>.
 
 * Fixed `HADOOP_GREMLIN_LIBS` parsing for Windows.
 * Improved GraphSON serialization performance around `VertexProperty`.
+* Changed some tests in `EventStrategyProcessTest` which were enforcing some unintended semantics
around transaction state.
 
 [[release-3-2-5]]
 TinkerPop 3.2.5 (Release Date: June 12, 2017)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3035af1e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
index 6a20177..442847a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
@@ -562,9 +562,9 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.V(v).properties("xxx").properties("to-drop").drop().iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(v.properties()));
-        assertEquals(1, IteratorUtils.count(v.properties().next().properties()));
-        assertEquals("yay!", vp.value("not-dropped"));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties()));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties().properties()));
+        assertEquals("yay!", g.V(vp.element()).properties("xxx").values("not-dropped").next());
         assertThat(triggered.get(), is(true));
     }
 
@@ -601,8 +601,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.V(v).properties("xxx").property("to-change","bah").iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(v.properties()));
-        assertEquals(1, IteratorUtils.count(v.properties().next().properties()));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties()));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties().properties()));
         assertThat(triggered.get(), is(true));
     }
 
@@ -639,8 +639,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.V(v).properties("xxx").property("new","yay!").iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(v.properties()));
-        assertEquals(2, IteratorUtils.count(v.properties().next().properties()));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties()));
+        assertEquals(2, IteratorUtils.count(g.V(v).properties().properties()));
         assertThat(triggered.get(), is(true));
     }
 
@@ -677,7 +677,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.E(e).properties("to-drop").drop().iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(e.properties()));
+        assertEquals(1, IteratorUtils.count(g.E(e).properties()));
         assertEquals("yay!", e.value("not-dropped"));
         assertThat(triggered.get(), is(true));
     }
@@ -716,7 +716,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.E(e).property("to-change","yay!").iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(e.properties()));
+        assertEquals(1, IteratorUtils.count(g.E(e).properties()));
         assertThat(triggered.get(), is(true));
     }
 
@@ -754,7 +754,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.E(e).property("new","yay!").iterate();
         tryCommit(graph);
 
-        assertEquals(2, IteratorUtils.count(e.properties()));
+        assertEquals(2, IteratorUtils.count(g.E(e).properties()));
         assertThat(triggered.get(), is(true));
     }
 
@@ -854,8 +854,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.V(v).properties("to-remove").drop().iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(v.properties()));
-        assertEquals(vpToKeep.value(), v.value("to-keep"));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties()));
+        assertEquals(vpToKeep.value(), g.V(v).values("to-keep").next());
         assertThat(triggered.get(), is(true));
     }
 
@@ -890,7 +890,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.V(v).property(VertexProperty.Cardinality.single, "to-change", "dah").iterate();
         tryCommit(graph);
 
-        assertEquals(1, IteratorUtils.count(v.properties()));
+        assertEquals(1, IteratorUtils.count(g.V(v).properties()));
         assertThat(triggered.get(), is(true));
     }
 
@@ -925,7 +925,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest
{
         gts.V(v).property(VertexProperty.Cardinality.single, "new", "dah").iterate();
         tryCommit(graph);
 
-        assertEquals(2, IteratorUtils.count(v.properties()));
+        assertEquals(2, IteratorUtils.count(g.V(v).properties()));
         assertThat(triggered.get(), is(true));
     }
 


Mime
View raw message