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

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

codecov-commenter commented on PR #1893:
URL: https://github.com/apache/tinkerpop/pull/1893#issuecomment-1341644977

   # 
[Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1893?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#1893](https://codecov.io/gh/apache/tinkerpop/pull/1893?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (5a1d3d7) into 
[3.6-dev](https://codecov.io/gh/apache/tinkerpop/commit/69c12f9cabb6570d1fcef6ee5991b6cd3028b5ce?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (69c12f9) will **decrease** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             3.6-dev    #1893      +/-   ##
   =============================================
   - Coverage      69.46%   69.42%   -0.04%     
   + Complexity      9358     9355       -3     
   =============================================
     Files            878      878              
     Lines          41849    41850       +1     
     Branches        5632     5632              
   =============================================
   - Hits           29069    29056      -13     
   - Misses         10790    10805      +15     
   + Partials        1990     1989       -1     
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/tinkerpop/pull/1893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...org/apache/tinkerpop/gremlin/util/TestSupport.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi91dGlsL1Rlc3RTdXBwb3J0LmphdmE=)
 | `64.58% <100.00%> (+0.75%)` | :arrow_up: |
   | 
[...rg/apache/tinkerpop/gremlin/driver/Connection.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1kcml2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3RpbmtlcnBvcC9ncmVtbGluL2RyaXZlci9Db25uZWN0aW9uLmphdmE=)
 | `56.75% <0.00%> (-9.46%)` | :arrow_down: |
   | 
[...cess/computer/traversal/step/map/ShortestPath.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL2NvbXB1dGVyL3RyYXZlcnNhbC9zdGVwL21hcC9TaG9ydGVzdFBhdGguamF2YQ==)
 | `57.89% <0.00%> (-5.27%)` | :arrow_down: |
   | 
[...versal/step/map/ShortestPathVertexProgramStep.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL2NvbXB1dGVyL3RyYXZlcnNhbC9zdGVwL21hcC9TaG9ydGVzdFBhdGhWZXJ0ZXhQcm9ncmFtU3RlcC5qYXZh)
 | `90.00% <0.00%> (-3.34%)` | :arrow_down: |
   | 
[...apache/tinkerpop/gremlin/server/GremlinServer.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3RpbmtlcnBvcC9ncmVtbGluL3NlcnZlci9HcmVtbGluU2VydmVyLmphdmE=)
 | `57.07% <0.00%> (-0.98%)` | :arrow_down: |
   | 
[...in/process/traversal/dsl/graph/GraphTraversal.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9kc2wvZ3JhcGgvR3JhcGhUcmF2ZXJzYWwuamF2YQ==)
 | `91.49% <0.00%> (+0.64%)` | :arrow_up: |
   | 
[.../traversal/step/map/PageRankVertexProgramStep.java](https://codecov.io/gh/apache/tinkerpop/pull/1893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL2NvbXB1dGVyL3RyYXZlcnNhbC9zdGVwL21hcC9QYWdlUmFua1ZlcnRleFByb2dyYW1TdGVwLmphdmE=)
 | `76.74% <0.00%> (+4.65%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD 
build times. [Learn 
more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   




> Gherkin test issues for implementers
> ------------------------------------
>
>                 Key: TINKERPOP-2816
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2816
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: test-suite
>    Affects Versions: 3.6.1
>            Reporter: pieter martin
>            Assignee: Valentyn Kahamlyk
>            Priority: Blocker
>
> Sqlg is encountering some issues when running the Gherkin feature tests.
> h2. g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name
> {code:java}
>   Scenario: 
> g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name
>       Given the modern graph
>       And the traversal of
>         """
>         
> g.V().repeat(__.out().repeat(__.out()).times(1)).times(1).limit(1).path().by("name")
>         """
>       When iterated next
>       Then the result should be unordered
>         | result |
>         | marko |
>         | josh |
>         | ripple |
> {code}
> This test assumes an implicit order in the traversal. To fix the test we need 
> to add in an {{order().by("name")}}
> {code:java}
>   Scenario: 
> g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name
>       Given the modern graph
>       And the traversal of
>         """
>         g.V().repeat(__.out().repeat(__.out().order().by("name", 
> Order.desc)).times(1)).times(1).limit(1).path().by("name")
>         """
>       When iterated next
>       Then the result should be unordered
>         | result |
>         | marko |
>         | josh |
>         | ripple |
> {code}
> h2. g_V_both_both_dedup_byXoutE_countX_name
> {code:java}
>   Scenario: g_V_both_both_dedup_byXoutE_countX_name
>     Given the modern graph
>     And the traversal of
>       """
>       g.V().both().both().dedup().by(__.outE().count()).values("name")
>       """
>     When iterated to list
>     Then the result should be unordered
>       | result |
>       | marko |
>       | josh |
>       | peter |
>       | ripple |
> {code}
> This test assumes the order of {{{}V().both().both(){}}}.
> Unfortunately putting in an {{order().by("name")}} does not help. This is 
> because of a second bug where {{TinkerPop}} is rewriting the steps 
> incorrectly.
> {code:java}
> @Test
> public void testDedupSteps() {
>     final TinkerGraph g = TinkerFactory.createModern();
>     GraphTraversal<Vertex, String> traversal = 
> g.traversal().V().both().both().order().by("name", 
> Order.asc).dedup().by(__.outE().count()).<String>values("name");
>     traversal.hasNext();
>     System.out.println(((DefaultGraphTraversal)traversal).getSteps());
> }
> {code}
> This produces,
> {code:java}
> [TinkerGraphStep(vertex,[]), VertexStep(BOTH,vertex), NoOpBarrierStep(2500), 
> VertexStep(BOTH,vertex), DedupGlobalStep(null,[VertexStep(OUT,edge), 
> CountGlobalStep]), OrderGlobalStep([[value([CoalesceStep([value(name), 
> (null)])]), asc]]), PropertiesStep([name],value)]
> {code}
> For some reason the {{OrderGlobalStep}} is moved to the end, after the 
> {{DedupGlobalStep}}
> h2. g_V_playlist_paths
> {code:java}
>   Scenario: g_V_playlist_paths
>     Given the grateful graph
>     And the traversal of
>       """
>       g.V().has("name", "Bob_Dylan").
>         in("sungBy").order().by('name').as("a").
>         repeat(__.out().order().by('name').simplePath().from("a")).
>           until(__.out("writtenBy").has("name", 
> "Johnny_Cash")).limit(1).as("b").
>         
> repeat(__.out().order().by('name').as("c").simplePath().from("b").to("c")).
>           until(__.out("sungBy").has("name", "Grateful_Dead")).limit(1).
>         path().from("a").unfold().
>         project("song", "artists").
>           by("name").
>           by(__.coalesce(__.out("sungBy", 
> "writtenBy").dedup().values("name").order(), __.constant("Unknown")).fold())
>       """
>     When iterated to list
>     Then the result should be unordered
>       | result |
>       | m[{"song": "CHIMES OF FREEDOM", "artists": ["Bob_Dylan"]}] |
>       | m[{"song": "QUEEN JANE", "artists": ["Unknown"]}] |
>       | m[{"song": "ALTHEA", "artists": ["Garcia","Hunter"]}] |
>       | m[{"song": "BIG RIVER", "artists": ["Johnny_Cash","Weir"]}] |
>       | m[{"song": "HES GONE", "artists": ["Garcia","Hunter"]}] |
>       | m[{"song": "CAUTION", "artists": ["Grateful_Dead"]}] |
> {code}
> This test also assumes `order`. Even though it has 
> `__.out().order().by('name')` it is the path that needs to be ordered. 
> Ordering on `name` is not good enough as there are duplicates.
> Here is an improved version.
> {code:java}
>         List<Map<String, Object>> result = g.traversal().V().has("name", 
> "Bob_Dylan").
>                 in("sungBy").order().by("name").as("a").
> //                repeat(__.out().order().by("name").simplePath().from("a")).
>                 
> repeat(__.out().order().by(__.path().by("name").map(pathTraverser -> 
> pathTraverser.get().toString()), String::compareTo).simplePath().from("a")).
>                 until(__.out("writtenBy").has("name", 
> "Johnny_Cash")).limit(1).as("b").
> //                
> repeat(__.out().order().by("name").as("c").simplePath().from("b").to("c")).
>                 
> repeat(__.out().order().by(__.path().by("name").map(pathTraverser -> 
> pathTraverser.get().toString()), 
> String::compareTo).as("c").simplePath().from("b").to("c")).
>                 until(__.out("sungBy").has("name", "Grateful_Dead")).limit(1).
>                 path().from("a").unfold().
>                 project("song", "artists").
>                 by("name").
>                 by(__.coalesce(__.out("sungBy", 
> "writtenBy").dedup().values("name").order(), 
> __.constant("Unknown")).fold()).toList();
>         List<Map<String, Object>> expected = Arrays.asList(
>                 new HashMap<String, Object>() {{
>                     put("song", "CHIMES OF FREEDOM");
>                     put("artists", Arrays.asList("Bob_Dylan"));
>                 }},
>                 new HashMap<String, Object>() {{
>                     put("song", "QUEEN JANE");
>                     put("artists", Arrays.asList("Unknown"));
>                 }},
>                 new HashMap<String, Object>() {{
>                     put("song", "ALTHEA");
>                     put("artists", Arrays.asList("Garcia", "Hunter"));
>                 }},
>                 new HashMap<String, Object>() {{
>                     put("song", "BIG RIVER");
>                     put("artists", Arrays.asList("Johnny_Cash", "Weir"));
>                 }},
>                 new HashMap<String, Object>() {{
>                     put("song", "BERTHA");
>                     put("artists", Arrays.asList("Garcia", "Hunter"));
>                 }},
>                 new HashMap<String, Object>() {{
>                     put("song", "DRUMS");
>                     put("artists", Arrays.asList("Grateful_Dead"));
>                 }}
>         );
>         Assert.assertEquals(expected, result);
> {code}
> h2. g_withStrategiesXReadOnlyStrategyX_addVXpersonX_fromXVX1XX_toXVX2XX
> {code:java}
>   @WithReadOnlyStrategy
>   Scenario: 
> g_withStrategiesXReadOnlyStrategyX_addVXpersonX_fromXVX1XX_toXVX2XX
>     Given the empty graph
>     And the traversal of
>       """
>       
> g.withStrategies(ReadOnlyStrategy).addE("link").from(__.V(1)).to(__.V(2))
>       """
>     When iterated to list
>     Then the traversal will raise an error with message containing text of 
> "The provided traversal has a mutating step and thus is not read only"
> {code}
> This test assumes Integer ids are valid. If a graph does not support Integer 
> ids then it fails with a different exception.
> h2. g_withStrategiesXReadOnlyStrategyX_V_addVXpersonX_fromXVX1XX
> {code:java}
>   @WithReadOnlyStrategy
>   Scenario: g_withStrategiesXReadOnlyStrategyX_V_addVXpersonX_fromXVX1XX
>     Given the empty graph
>     And the traversal of
>       """
>       g.withStrategies(ReadOnlyStrategy).V().addE("link").from(__.V(1))
>       """
>     When iterated to list
>     Then the traversal will raise an error with message containing text of 
> "The provided traversal has a mutating step and thus is not read only"
> {code}
> This test assumes Integer ids are valid. If a graph does not support Integer 
> ids then it fails with a different exception.
> h2. g_V_order_byXoutE_count_descX
> {code:java}
>   Scenario: g_V_order_byXoutE_count_descX
>     Given the modern graph
>     And the traversal of
>       """
>       g.V().order().by(__.outE().count(), Order.desc)
>       """
>     When iterated to list
>     Then the result should be ordered
>       | result |
>       | v[marko] |
>       | v[josh]   |
>       | v[peter] |
>       | v[vadas] |
>       | v[lop] |
>       | v[ripple] |
> {code}
> The order is not guaranteed as the out edge count repeats for 'vadas', 'lop' 
> and 'ripple'.



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

Reply via email to