Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1691 [created] 2cf151939


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/2cf15193
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2cf15193
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2cf15193

Branch: refs/heads/TINKERPOP-1691
Commit: 2cf151939b07beac2fa967f2d422f6dc6167f329
Parents: b9a439a
Author: Stephen Mallette <[email protected]>
Authored: Tue Jun 20 11:38:44 2017 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Tue Jun 20 11:38:44 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2cf15193/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4e6dc16..95760de 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/2cf15193/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..d459b0b 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));
     }
 
@@ -855,7 +855,7 @@ public class EventStrategyProcessTest extends 
AbstractGremlinProcessTest {
         tryCommit(graph);
 
         assertEquals(1, IteratorUtils.count(v.properties()));
-        assertEquals(vpToKeep.value(), v.value("to-keep"));
+        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));
     }
 

Reply via email to