Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210360228
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210360228
Commits
0cd27bc6
Unverified
Commit
0cd27bc6
authored
4 years ago
by
Yee
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix failures about `insert' test cases (#890)
parent
b14c4344
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/tck/features/insert/Insert.IntVid.feature
+31
-22
31 additions, 22 deletions
tests/tck/features/insert/Insert.IntVid.feature
tests/tck/features/insert/Insert.feature
+50
-56
50 additions, 56 deletions
tests/tck/features/insert/Insert.feature
with
81 additions
and
78 deletions
tests/tck/features/insert/Insert.IntVid.feature
+
31
−
22
View file @
0cd27bc6
...
...
@@ -76,8 +76,10 @@ Feature: Insert int vid of vertex and edge
# insert edge invalid timestamp
When executing query
:
"""
INSERT EDGE study(start_time, end_time) VALUES
hash("Laura")->hash("sun_school"):(timestamp("2300-01-01T10:00:00"), now()+3600*24*365*3);
INSERT EDGE
study(start_time, end_time)
VALUES
hash("Laura")->hash("sun_school"):(timestamp("2300-01-01T10:00:00"), now()+3600*24*365*3);
"""
Then a ExecutionError should be raised at runtime
:
And
drop the used space
...
...
@@ -109,13 +111,13 @@ Feature: Insert int vid of vertex and edge
# """
# Then the execution should be successful
# insert vertex with string timestamp succeeded
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX school(name, create_time) VALUES hash("sun_school"):("sun_school", timestamp("2010-01-01T10:00:00"))
"""
Then
the execution should be successful
# insert edge succeeded
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT EDGE schoolmate(likeness, nickname) VALUES hash("Tom")->hash("Lucy"):(85, "Lily")
"""
...
...
@@ -135,10 +137,12 @@ Feature: Insert int vid of vertex and edge
|
schoolmate._src
|
schoolmate._dst
|
schoolmate._rank
|
schoolmate.likeness
|
schoolmate.nickname
|
|
'Tom'
|
'Bob'
|
0
|
87
|
"Superman"
|
# insert edge with timestamp succeed
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT EDGE study(start_time, end_time) VALUES
hash("Laura")->hash("sun_school"):(timestamp("2019-01-01T10:00:00"), now()+3600*24*365*3)
INSERT EDGE
study(start_time, end_time)
VALUES
hash("Laura")->hash("sun_school"):(timestamp("2019-01-01T10:00:00"), now()+3600*24*365*3)
"""
Then
the execution should be successful
# check edge result with go
...
...
@@ -242,6 +246,11 @@ Feature: Insert int vid of vertex and edge
|
schoolmate.likeness
|
$$.person.name
|
$$.student.grade
|
$$.student.number
|
|
90
|
'Laura'
|
'three'
|
20190901008
|
|
95
|
'Amber'
|
'four'
|
20180901003
|
When try to execute query
:
"""
INSERT VERTEX student(grade, number) VALUES hash("Aero"):("four", 20190901003);
"""
Then
the execution should be successful
# test multi sentences multi tags succeeded
When executing query
:
"""
...
...
@@ -259,7 +268,7 @@ Feature: Insert int vid of vertex and edge
|
$$.student.number
|
$$.person.name
|
|
20190901003
|
'Aero'
|
# test same prop name diff type
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX
person(name, age),
...
...
@@ -299,7 +308,7 @@ Feature: Insert int vid of vertex and edge
|
$^.person.name
|
$^.employee.name
|
schoolmate.likeness
|
$$.person.name
|
$$.interest.name
|
$$.person.age
|
|
'Petter'
|
456
|
90
|
'Bob'
|
'basketball'
|
19
|
# insert vertex using name and age default value
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX personWithDefault() VALUES 111:();
"""
...
...
@@ -310,12 +319,6 @@ Feature: Insert int vid of vertex and edge
INSERT VERTEX personWithDefault(age, isMarried, BMI) VALUES hash("Tom"):(18, false);
"""
Then a SemanticError should be raised at runtime
:
# insert column doesn't match value count
When executing query
:
"""
INSERT VERTEX studentWithDefault(grade, number) VALUES hash("Tom"):("one", 111, "");
"""
Then a SemanticError should be raised at runtime
:
# insert vertex using age default value
When executing query
:
"""
...
...
@@ -329,7 +332,7 @@ Feature: Insert int vid of vertex and edge
"""
Then
the execution should be successful
# insert vertices multi tags with default value
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX
personWithDefault(name, BMI),
...
...
@@ -345,6 +348,18 @@ Feature: Insert int vid of vertex and edge
INSERT VERTEX personWithDefault(name) VALUES hash("Kitty"):("Kitty"), hash("Peter"):("Peter")
"""
Then
the execution should be successful
# insert column doesn't match value count
When executing query
:
"""
INSERT VERTEX studentWithDefault(grade, number) VALUES hash("Tom"):("one", 111, "");
"""
Then a SemanticError should be raised at runtime
:
# insert edge with all default value
When try to execute query
:
"""
INSERT EDGE schoolmateWithDefault() VALUES hash("Tom")->hash("Lucy"):()
"""
Then
the execution should be successful
# insert edge lack of the column value
When executing query
:
"""
...
...
@@ -357,12 +372,6 @@ Feature: Insert int vid of vertex and edge
INSERT EDGE schoolmateWithDefault(likeness) VALUES hash("Tom")->hash("Lucy"):(60, "")
"""
Then a SemanticError should be raised at runtime
:
# insert edge with all default value
When executing query
:
"""
INSERT EDGE schoolmateWithDefault() VALUES hash("Tom")->hash("Lucy"):()
"""
Then
the execution should be successful
# insert edge with unknown filed name
When executing query
:
"""
...
...
This diff is collapsed.
Click to expand it.
tests/tck/features/insert/Insert.feature
+
50
−
56
View file @
0cd27bc6
...
...
@@ -52,6 +52,12 @@ Feature: Insert string vid of vertex and edge
INSERT VERTEX person(Name, age) VALUES "Tom":("Tom", 3);
"""
Then a SemanticError should be raised at runtime
:
# insert edge succeeded
When try to execute query
:
"""
INSERT EDGE schoolmate(likeness, nickname) VALUES "Tom"->"Lucy":(85, "Lily")
"""
Then
the execution should be successful
# insert vertex wrong type
When executing query
:
"""
...
...
@@ -76,6 +82,12 @@ Feature: Insert string vid of vertex and edge
INSERT EDGE schoolmate(like, HH) VALUES "Laura"->"Amber":(88);
"""
Then a SemanticError should be raised at runtime
:
# insert edge with timestamp succeed
When try to execute query
:
"""
INSERT EDGE study(start_time, end_time) VALUES "Laura"->"sun_school":(timestamp("2019-01-01T10:00:00"), now()+3600*24*365*3)
"""
Then
the execution should be successful
# insert edge invalid timestamp
When executing query
:
"""
...
...
@@ -100,17 +112,11 @@ Feature: Insert string vid of vertex and edge
|
vertices_
|
|
('Conan')
|
# insert vertex with string timestamp succeeded
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX school(name, create_time) VALUES "sun_school":("sun_school", timestamp("2010-01-01T10:00:00"))
"""
Then
the execution should be successful
# insert edge succeeded
When executing query
:
"""
INSERT EDGE schoolmate(likeness, nickname) VALUES "Tom"->"Lucy":(85, "Lily")
"""
Then
the execution should be successful
# insert edge with unordered prop edge
When executing query
:
"""
...
...
@@ -125,12 +131,6 @@ Feature: Insert string vid of vertex and edge
Then the result should be, in any order
:
|
schoolmate._src
|
schoolmate._dst
|
schoolmate._rank
|
schoolmate.likeness
|
schoolmate.nickname
|
|
'Tom'
|
'Bob'
|
0
|
87
|
'Superman'
|
# insert edge with timestamp succeed
When executing query
:
"""
INSERT EDGE study(start_time, end_time) VALUES "Laura"->"sun_school":(timestamp("2019-01-01T10:00:00"), now()+3600*24*365*3)
"""
Then
the execution should be successful
# check edge result with go
When executing query
:
"""
...
...
@@ -151,15 +151,13 @@ Feature: Insert string vid of vertex and edge
# insert one vertex multi tags
When executing query
:
"""
INSERT VERTEX person(name, age), student(grade, number) VALUES
"Lucy":("Lucy", 8, "three", 20190901001)
INSERT VERTEX person(name, age), student(grade, number) VALUES "Lucy":("Lucy", 8, "three", 20190901001)
"""
Then
the execution should be successful
# insert one vertex multi tags with unordered order prop
When executing query
:
"""
INSERT VERTEX person(age, name),student(number, grade) VALUES
"Bob":(9, "Bob", 20191106001, "four")
INSERT VERTEX person(age, name),student(number, grade) VALUES "Bob":(9, "Bob", 20191106001, "four")
"""
Then
the execution should be successful
# check person tag result with fetch
...
...
@@ -181,22 +179,24 @@ Feature: Insert string vid of vertex and edge
# insert multi vertex multi tags
When executing query
:
"""
INSERT VERTEX person(name, age),student(grade, number) VALUES
"Laura":("Laura", 8, "three", 20190901008),"Amber":("Amber", 9, "four", 20180901003)
INSERT VERTEX
person(name, age),
student(grade, number)
VALUES
"Laura":("Laura", 8, "three", 20190901008),
"Amber":("Amber", 9, "four", 20180901003);
"""
Then
the execution should be successful
# insert multi vertex one tag
When executing query
:
"""
INSERT VERTEX person(name, age) VALUES
"Kitty":("Kitty", 8), "Peter":("Peter", 9)
INSERT VERTEX person(name, age) VALUES "Kitty":("Kitty", 8), "Peter":("Peter", 9)
"""
Then
the execution should be successful
# insert multi edges
When executing query
:
"""
INSERT EDGE schoolmate(likeness, nickname) VALUES
"Tom"->"Kitty":(81, "Kitty"), "Tom"->"Peter":(83, "Kitty")
INSERT EDGE schoolmate(likeness, nickname) VALUES "Tom"->"Kitty":(81, "Kitty"), "Tom"->"Peter":(83, "Kitty")
"""
Then
the execution should be successful
# check edge result with go
...
...
@@ -214,15 +214,13 @@ Feature: Insert string vid of vertex and edge
# insert multi tag
When executing query
:
"""
INSERT EDGE schoolmate(likeness, nickname) VALUES
"Lucy"->"Laura":(90, "Laura"), "Lucy"->"Amber":(95, "Amber")
INSERT EDGE schoolmate(likeness, nickname) VALUES "Lucy"->"Laura":(90, "Laura"), "Lucy"->"Amber":(95, "Amber")
"""
Then
the execution should be successful
# insert with edge
When executing query
:
"""
INSERT EDGE schoolmate(likeness, nickname) VALUES
"Laura"->"Aero":(90, "Aero")
INSERT EDGE schoolmate(likeness, nickname) VALUES "Laura"->"Aero":(90, "Aero")
"""
Then
the execution should be successful
# get multi tag through go
...
...
@@ -238,11 +236,9 @@ Feature: Insert string vid of vertex and edge
# test multi sentences multi tags succeeded
When executing query
:
"""
INSERT VERTEX person(name, age) VALUES
"Aero":("Aero", 8);INSERT VERTEX student(grade, number)
VALUES "Aero":("four", 20190901003);
INSERT EDGE schoolmate(likeness, nickname)
VALUES "Laura"->"Aero":(90, "Aero")
INSERT VERTEX person(name, age) VALUES "Aero":("Aero", 8);
INSERT VERTEX student(grade, number) VALUES "Aero":("four", 20190901003);
INSERT EDGE schoolmate(likeness, nickname) VALUES "Laura"->"Aero":(90, "Aero");
"""
Then
the execution should be successful
# get result through go
...
...
@@ -291,7 +287,7 @@ Feature: Insert string vid of vertex and edge
|
$^.person.name
|
$^.employee.name
|
schoolmate.likeness
|
$$.person.name
|
$$.interest.name
|
$$.person.age
|
|
'Petter'
|
456
|
90
|
'Bob'
|
'basketball'
|
19
|
# insert vertex using name and age default value
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX personWithDefault() VALUES "111":();
"""
...
...
@@ -302,12 +298,6 @@ Feature: Insert string vid of vertex and edge
INSERT VERTEX personWithDefault(age, isMarried, BMI) VALUES "Tom":(18, false);
"""
Then a SemanticError should be raised at runtime
:
# insert column doesn't match value count
When executing query
:
"""
INSERT VERTEX studentWithDefault(grade, number) VALUES "Tom":("one", 111, "");
"""
Then a SemanticError should be raised at runtime
:
# insert vertex using age default value
When executing query
:
"""
...
...
@@ -321,7 +311,7 @@ Feature: Insert string vid of vertex and edge
"""
Then
the execution should be successful
# insert vertices multi tags with default value
When execut
ing
query
:
When
try to
execut
e
query
:
"""
INSERT VERTEX
personWithDefault(name, BMI),
...
...
@@ -331,11 +321,22 @@ Feature: Insert string vid of vertex and edge
"Amber":("Amber", 22.5, 20180901003)
"""
Then
the execution should be successful
# insert column doesn't match value count
When executing query
:
"""
INSERT VERTEX studentWithDefault(grade, number) VALUES "Tom":("one", 111, "");
"""
Then a SemanticError should be raised at runtime
:
# multi vertices one tag with default value
When executing query
:
"""
INSERT VERTEX personWithDefault(name) VALUES
"Kitty":("Kitty"), "Peter":("Peter")
INSERT VERTEX personWithDefault(name) VALUES "Kitty":("Kitty"), "Peter":("Peter")
"""
Then
the execution should be successful
# insert edge with all default value
When try to execute query
:
"""
INSERT EDGE schoolmateWithDefault() VALUES "Tom"->"Lucy":()
"""
Then
the execution should be successful
# insert edge lack of the column value
...
...
@@ -350,12 +351,6 @@ Feature: Insert string vid of vertex and edge
INSERT EDGE schoolmateWithDefault(likeness) VALUES "Tom"->"Lucy":(60, "")
"""
Then a SemanticError should be raised at runtime
:
# insert edge with all default value
When executing query
:
"""
INSERT EDGE schoolmateWithDefault() VALUES "Tom"->"Lucy":()
"""
Then
the execution should be successful
# insert edge with unknown filed name
When executing query
:
"""
...
...
@@ -365,8 +360,7 @@ Feature: Insert string vid of vertex and edge
# insert multi edges with default value
When executing query
:
"""
INSERT EDGE schoolmateWithDefault() VALUES
"Tom"->"Kitty":(), "Tom"->"Peter":(), "Lucy"->"Laura":(), "Lucy"->"Amber":()
INSERT EDGE schoolmateWithDefault() VALUES "Tom"->"Kitty":(), "Tom"->"Peter":(), "Lucy"->"Laura":(), "Lucy"->"Amber":()
"""
Then
the execution should be successful
# get result through go
...
...
@@ -438,6 +432,12 @@ Feature: Insert string vid of vertex and edge
INSERT VERTEX course(name) VALUES "Math":("Math")
"""
Then
the execution should be successful
# test insert with empty str vid
When try to execute query
:
"""
INSERT VERTEX student(name, age) VALUES "":("Tom", 12)
"""
Then
the execution should be successful
# test insert out of range id size
When executing query
:
"""
...
...
@@ -469,12 +469,6 @@ Feature: Insert string vid of vertex and edge
Then the result should be, in any order, with relax comparison
:
|
vertices_
|
|
('English')
|
# test insert with empty str vid
When executing query
:
"""
INSERT VERTEX student(name, age) VALUES "":("Tom", 12)
"""
Then
the execution should be successful
# check result
When executing query
:
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment