[
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15928740#comment-15928740
]
ASF GitHub Bot commented on TINKERPOP-1652:
-------------------------------------------
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/572#discussion_r106516160
--- Diff:
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java
---
@@ -191,6 +200,58 @@ public void doTest() {
{__.V().as("a").optional(bothE().dedup().as("b")).
choose(select("b"), select("a","b"),
project("a").by(select("a"))),
"[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a,
b]]]", null},
+ {__.V().as("a").out().select("a").program(new
MockVertexProgram(
+ new
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH)))), "[]", null}
});
}
-}
+
+ // do nothing mock vertex program for traverser requirement testing
+ private static class MockVertexProgram implements VertexProgram<Tuple>
{
--- End diff --
can't this be replaced with a mockito mock?
```java
VertexProgram mock = mock(MockVertexProgram.class);
when(mock.getTraverserRequirements()).
thenReturn(new
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH))))
```
> Disable PathRetractionStrategy strategy if VertexProgramStep has
> LABELLED_PATH requirement
> ------------------------------------------------------------------------------------------
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
> Issue Type: Bug
> Reporter: Ted Wilmes
> Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.
> We already handle the case where path is required but this issue will also
> disable the strategy if a vertex program is present that requires
> {{LABELLED_PATH}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)