[ 
https://issues.apache.org/jira/browse/TINKERPOP-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946220#comment-17946220
 ] 

ASF GitHub Bot commented on TINKERPOP-3136:
-------------------------------------------

kenhuuu commented on code in PR #3097:
URL: https://github.com/apache/tinkerpop/pull/3097#discussion_r2052984860


##########
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TreeTest.java:
##########
@@ -97,6 +99,50 @@ public void shouldMergeTreesCorrectly() {
         assertTrue(mergeTree.getObjectsAtDepth(3).contains("1_2_2"));
     }
 
+    @Test
+    public void testPrettyPrintSingleNode() {
+        final Tree<String> tree = new Tree<>();
+        tree.put("root", new Tree<>());
+
+        final String expected = "|--root";
+        assertEquals(expected, tree.prettyPrint());
+    }
+
+    @Test
+    public void testPrettyPrintMultipleNodes() {
+        final Tree<String> tree = new Tree<>();
+        final Tree<String> child1 = new Tree<>();
+        final Tree<String> child2 = new Tree<>();
+        tree.put("root", new Tree<>());
+        tree.get("root").put("child1", child1);
+        tree.get("root").put("child2", child2);
+
+        // either can be expected since Tree doesn't maintain node order
+        final String expected1 = "|--root\n   |--child1\n   |--child2";

Review Comment:
   Can't use a `\n` in this file (appears multiple times) as it won't work on 
Windows.





> Complete move to Gherkin for implementation testing
> ---------------------------------------------------
>
>                 Key: TINKERPOP-3136
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3136
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: test-suite
>    Affects Versions: 3.7.3
>            Reporter: Stephen Mallette
>            Priority: Major
>
> TinkerPop is most of the way to testing Gremlin exclusively with Gherkin. By 
> 4.0 that move should be complete with whatever deprecations necessary for 
> Java tests along 3.x. Retain the Java test suite for embedded {{Graph}} tests 
> that only make sense in that case.
> For 3.x - likely 3.8.x
> * Create {{ProcessEmbeddedSuite}} and deprecate {{ProcessLimitedSuite}} to 
> make it clear what aspects of Gremlin are meant for embedded cases and 
> Java/Groovy sugar only. Update provider documentation to reflect these 
> changes and ensure Gherkin is clear as the primary test suite for Gremlin.
> * Drop {{MergeVertexTest}} and {{MergeEdgeTest}} as remaining tests in there 
> seem to be covered by Gherkin already.
> * Drop {{SubgraphTest}} since it should be able to be converted to feature 
> tests but will need to add a way to assert a {{Graph}} though. Ignore in 
> languages that don't have {{{}Graph{}}}.
> * Drop {{TreeTest}} since it should be able to be converted to feature tests 
> but will need to add a way to assert a {{Tree}} though. Ignore in languages 
> that don't have {{{}Tree{}}}.
> * Implement Gherkin tests for {{match()}} - do a limited and simple set to 
> minimally test the capability since that feature is a bit up in the air for 
> 4.x. Retain {{MatchTest}} as it is for the embedded suite for now.
> * For {{{}ComplexTest{}}}:
>  ** {{cap('m')}} from {{classicRecommendation}} so that it can be asserted in 
> {{{}Recommendation.feature{}}}.
>  *** Figure out a way to assert the {{coworkerSummary}} tests in Gherkin. We 
> don't currently have a way to assert very complex {{{}Map{}}}. The basic test 
> could be run multiple times to try to break up the results to fit with the 
> assertion capabilities?
>  ** Move {{playlistPths}} to {{Paths.feature}}
>  ** Remove {{ComplexTest}} as all relevant tests will have been moved to 
> Gherkin.
> * Remove {{PartitionStrategyProcessTest}} - seems to be covered in Gherkin at 
> this point.
> * Convert {{TernaryBooleanLogicsTest}} to Gherkin - add it to the 
> {{/semantics}} directory.
> * Remove all lambda based tests from Gherkin since they are not supported by 
> gremlin-language. Ensure that they all exist in the embedded tests. Perhaps 
> put them all in a {{LambdaStepTest}} and combine in other embedded tests 
> there so that they are all in once place. Remove all infrastructure for 
> processing lambdas in the Gherkin suite. Test lambdas in GLVs independently.
> For 4.x
>  * Remove {{ProcessLimitedSuite}} in favor of {{ProcessEmbeddedSuite}}
>  * Since {{Tree}} and {{Graph}} will be present in 4.x for all languages, 
> ensure that test suites are updated in support of those assertions as these 
> tests will have been skipped prior.
> h3. Open questions
>  * Make a decision about {{profile()}} and {{explain()}} in terms of how they 
> are tested. Leaning toward them remaining an embedded case as they have 
> implementation specific output potentially
>  * Examine "Given an unsupported test" definitions....can any be supported 
> now? what do we do with those that cant?
> Note the linked JIRAs below as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to