Skip to content

Commit

Permalink
Enable the skip go sample test cases. (#3086)
Browse files Browse the repository at this point in the history
* Enable the skip go sample test cases.

* Format.
  • Loading branch information
Shylock-Hg authored Dec 2, 2021
1 parent ab73b4c commit e319615
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 6 deletions.
94 changes: 94 additions & 0 deletions tests/tck/features/go/GO.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,100 @@ Feature: IntegerVid Go Sentence
Then the result should be, in any order:
| serve._dst |

Scenario: go step limit
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst LIMIT [10,10];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst LIMIT ["10"];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst LIMIT [a];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst LIMIT [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[+-]?\d+/ |
When executing query:
"""
GO 3 STEPS FROM hash("Tim Duncan") OVER like YIELD like._dst LIMIT [1, 2, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[+-]?\d+/ |
| /[+-]?\d+/ |

@skip
Scenario: go step filter & step limit
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like WHERE [like._dst == "Tony Parker"] LIMIT [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
When executing query:
"""
GO 3 STEPS FROM hash("Tim Duncan") OVER like WHERE [like._dst == "Tony Parker", $$.player.age>20, $$.player.age>22] LIMIT [1, 2, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |

Scenario: go step sample
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst SAMPLE [10,10];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst SAMPLE ["10"];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst SAMPLE [a];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like YIELD like._dst SAMPLE [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[+-]?\d+/ |
When executing query:
"""
GO 3 STEPS FROM hash("Tim Duncan") OVER like YIELD like._dst SAMPLE [1, 3, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[+-]?\d+/ |
| /[+-]?\d+/ |

@skip
Scenario: go step filter & step sample
When executing query:
"""
GO FROM hash("Tim Duncan") OVER like WHERE [like._dst == "Tony Parker"] SAMPLE [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
When executing query:
"""
GO 3 STEPS FROM hash("Tim Duncan") OVER like WHERE [like._dst == "Tony Parker", $$.player.age>20, $$.player.age>22] SAMPLE [1, 2, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |

Scenario: go from vertices looked up by index
When executing query:
"""
Expand Down
61 changes: 55 additions & 6 deletions tests/tck/features/go/GO.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1771,35 +1771,37 @@ Feature: Go Sentence
Then the result should be, in any order:
| serve._dst |

@skip
Scenario: go step limit
When executing query:
"""
GO FROM "Tim Duncan" OVER like LIMIT [10,10] YIELD like._dst;
GO FROM "Tim Duncan" OVER like YIELD like._dst LIMIT [10,10];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM "Tim Duncan" OVER like LIMIT ["10"] YIELD like._dst;
GO FROM "Tim Duncan" OVER like YIELD like._dst LIMIT ["10"];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM "Tim Duncan" OVER like LIMIT [a] YIELD like._dst;
GO FROM "Tim Duncan" OVER like YIELD like._dst LIMIT [a];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM "Tim Duncan" OVER like LIMIT [1] YIELD like._dst;
GO FROM "Tim Duncan" OVER like YIELD like._dst LIMIT [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[\s\w]+/ |
When executing query:
"""
GO 3 STEPS FROM "Tim Duncan" OVER like LIMIT [1, 2, 2] YIELD like._dst;
GO 3 STEPS FROM "Tim Duncan" OVER like YIELD like._dst LIMIT [1, 2, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[\s\w]+/ |
| /[\s\w]+/ |

@skip
Scenario: go step filter & step limit
Expand All @@ -1816,6 +1818,53 @@ Feature: Go Sentence
Then the result should be, in any order, with relax comparison:
| like._dst |

Scenario: go step sample
When executing query:
"""
GO FROM "Tim Duncan" OVER like YIELD like._dst SAMPLE [10,10];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM "Tim Duncan" OVER like YIELD like._dst SAMPLE ["10"];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM "Tim Duncan" OVER like YIELD like._dst SAMPLE [a];
"""
Then a SemanticError should be raised at runtime:
When executing query:
"""
GO FROM "Tim Duncan" OVER like YIELD like._dst SAMPLE [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[\s\w]+/ |
When executing query:
"""
GO 3 STEPS FROM "Tim Duncan" OVER like YIELD like._dst SAMPLE [1, 3, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
| /[\s\w]+/ |
| /[\s\w]+/ |

@skip
Scenario: go step filter & step sample
When executing query:
"""
GO FROM "Tim Duncan" OVER like WHERE [like._dst == "Tony Parker"] SAMPLE [1];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |
When executing query:
"""
GO 3 STEPS FROM "Tim Duncan" OVER like WHERE [like._dst == "Tony Parker", $$.player.age>20, $$.player.age>22] SAMPLE [1, 2, 2];
"""
Then the result should be, in any order, with relax comparison:
| like._dst |

Scenario: with no existed tag
When executing query:
"""
Expand Down

0 comments on commit e319615

Please sign in to comment.