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 2021/06/17 13:25:04 UTC
[tinkerpop] branch master updated (8c47d7a -> dabdf04)
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.
from 8c47d7a Change log entry added on wrong version CTR
new d88691e TINKERPOP-2579 Added test to validate EventStrategy with upsert pattern CTR
new 189409a Merge branch '3.4-dev' into 3.5-dev
new af75003 TINKERPOP-2579 Temporarily ignore failing test for EventStrategy operations with anonymous traversals.
new dabdf04 Merge branch '3.5-dev'
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../strategy/decoration/EventStrategyTest.java | 6 ++++-
.../decoration/EventStrategyProcessTest.java | 27 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
[tinkerpop] 04/04: Merge branch '3.5-dev'
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit dabdf04686f3b58fefcddfd43cefdf9638de9797
Merge: 8c47d7a af75003
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Jun 17 09:24:48 2021 -0400
Merge branch '3.5-dev'
.../strategy/decoration/EventStrategyTest.java | 6 ++++-
.../decoration/EventStrategyProcessTest.java | 27 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
[tinkerpop] 02/04: Merge branch '3.4-dev' into 3.5-dev
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 189409adb14b66e74c0e19f53fa065240be87cb6
Merge: 39251c5 d88691e
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Jun 17 09:05:39 2021 -0400
Merge branch '3.4-dev' into 3.5-dev
.../strategy/decoration/EventStrategyTest.java | 6 ++++-
.../decoration/EventStrategyProcessTest.java | 26 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
[tinkerpop] 03/04: TINKERPOP-2579 Temporarily ignore failing test
for EventStrategy operations with anonymous traversals.
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit af75003b00b4ad6b814118cc1ba62d03099c45ed
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Jun 17 09:22:52 2021 -0400
TINKERPOP-2579 Temporarily ignore failing test for EventStrategy operations with anonymous traversals.
This test came in on 3.4-dev but fails on 3.5-dev for now. Will fix this as part of the referenced JIRA, but just wanted the failing test in place. CTR
---
.../process/traversal/strategy/decoration/EventStrategyProcessTest.java | 1 +
1 file changed, 1 insertion(+)
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 5aa9823..b648730 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
@@ -1964,6 +1964,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
@Test
@FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
+ @org.junit.Ignore("TINKERPOP-2579")
public void shouldTriggerAddVertexAndPropertyUpdateWithCoalescePattern() {
final StubMutationListener listener1 = new StubMutationListener();
final StubMutationListener listener2 = new StubMutationListener();
[tinkerpop] 01/04: TINKERPOP-2579 Added test to validate
EventStrategy with upsert pattern CTR
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit d88691e7e82baac7c9f7c98c112d9527fcbf242d
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Jun 17 09:04:51 2021 -0400
TINKERPOP-2579 Added test to validate EventStrategy with upsert pattern CTR
---
.../strategy/decoration/EventStrategyTest.java | 6 ++++-
.../decoration/EventStrategyProcessTest.java | 26 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
index f06b1a8..85c25d8 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
@@ -33,6 +33,8 @@ import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicInteger;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.addV;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.unfold;
import static org.junit.Assert.assertEquals;
/**
@@ -58,7 +60,9 @@ public class EventStrategyTest {
{new DefaultGraphTraversal<>(EmptyGraph.instance()).out("test").drop(), 1},
{new DefaultGraphTraversal<>(EmptyGraph.instance()).outE().drop(), 1},
{new DefaultGraphTraversal<>(EmptyGraph.instance()).outE().properties().drop(), 1},
- {new DefaultGraphTraversal<>(EmptyGraph.instance()).outE("test").drop(), 1}});
+ {new DefaultGraphTraversal<>(EmptyGraph.instance()).outE("test").drop(), 1},
+ {new DefaultGraphTraversal<>(EmptyGraph.instance()).V().has("p","a").fold().coalesce(unfold(), addV("person")).property("p", "a"), 2},
+ });
}
@Parameterized.Parameter(value = 0)
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 0992eae..5aa9823 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
@@ -46,6 +46,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.addV;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.unfold;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
@@ -1960,6 +1962,30 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
assertEquals(v, eventedVertex.get());
}
+ @Test
+ @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
+ public void shouldTriggerAddVertexAndPropertyUpdateWithCoalescePattern() {
+ final StubMutationListener listener1 = new StubMutationListener();
+ final StubMutationListener listener2 = new StubMutationListener();
+ final EventStrategy.Builder builder = EventStrategy.build()
+ .addListener(listener1)
+ .addListener(listener2);
+
+ if (graph.features().graph().supportsTransactions())
+ builder.eventQueue(new EventStrategy.TransactionalEventQueue(graph));
+
+ final EventStrategy eventStrategy = builder.create();
+
+ final GraphTraversalSource gts = create(eventStrategy);
+ gts.V().has("some","thing").fold().coalesce(unfold(), addV()).property("some", "thing").iterate();
+
+ tryCommit(graph, g -> assertEquals(1, IteratorUtils.count(gts.V().has("some", "thing"))));
+ assertEquals(1, listener1.addVertexEventRecorded());
+ assertEquals(1, listener2.addVertexEventRecorded());
+ assertEquals(1, listener1.vertexPropertyChangedEventRecorded());
+ assertEquals(1, listener2.vertexPropertyChangedEventRecorded());
+ }
+
private GraphTraversalSource create(final EventStrategy strategy) {
return graphProvider.traversal(graph, strategy);
}