Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert commented cases #240

Merged
merged 2 commits into from
Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 35 additions & 36 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,42 +1147,41 @@ func TestExecuteWithParameter(t *testing.T) {
col3)
}
// Complex result
// FIXME(Aiee) uncomment this after https://github.com/vesoft-inc/nebula/issues/4877 is fixed
// {
// query := "MATCH (v:person {name: $p4.b}) WHERE v.person.age>$p2-3 and $p1==true RETURN v ORDER BY $p3[0] LIMIT $p2"
// resp, err := tryToExecuteWithParameter(session, query, params)
// if err != nil {
// t.Fatalf(err.Error())
// return
// }
// checkResultSet(t, query, resp)

// assert.Equal(t, 1, resp.GetRowSize())
// record, err := resp.GetRowValuesByIndex(0)
// if err != nil {
// t.Fatalf(err.Error())
// return
// }
// valWrap, err := record.GetValueByIndex(0)
// if err != nil {
// t.Fatalf(err.Error())
// return
// }
// node, err := valWrap.AsNode()
// if err != nil {
// t.Fatalf(err.Error())
// return
// }
// assert.Equal(t,
// "(\"Bob\" :student{interval: P1MT100.000020000S, name: \"Bob\"} "+
// ":person{age: 10, birthday: 2010-09-10T10:08:02.000000, book_num: 100, "+
// "child_name: \"Hello Worl\", expend: 100.0, "+
// "first_out_city: 1111, friends: 10, grade: 3, "+
// "hobby: __NULL__, is_girl: false, "+
// "morning: 07:10:00.000000, name: \"Bob\", "+
// "property: 1000.0, start_school: 2017-09-10})",
// node.String())
// }
{
query := "MATCH (v:person {name: $p4.b}) WHERE v.person.age>$p2-3 and $p1==true RETURN v ORDER BY $p3[0] LIMIT $p2"
resp, err := tryToExecuteWithParameter(session, query, params)
if err != nil {
t.Fatalf(err.Error())
return
}
checkResultSet(t, query, resp)

assert.Equal(t, 1, resp.GetRowSize())
record, err := resp.GetRowValuesByIndex(0)
if err != nil {
t.Fatalf(err.Error())
return
}
valWrap, err := record.GetValueByIndex(0)
if err != nil {
t.Fatalf(err.Error())
return
}
node, err := valWrap.AsNode()
if err != nil {
t.Fatalf(err.Error())
return
}
assert.Equal(t,
"(\"Bob\" :student{interval: P1MT100.000020000S, name: \"Bob\"} "+
":person{age: 10, birthday: 2010-09-10T10:08:02.000000, book_num: 100, "+
"child_name: \"Hello Worl\", expend: 100.0, "+
"first_out_city: 1111, friends: 10, grade: 3, "+
"hobby: __NULL__, is_girl: false, "+
"morning: 07:10:00.000000, name: \"Bob\", "+
"property: 1000.0, start_school: 2017-09-10})",
node.String())
}
}

func TestReconnect(t *testing.T) {
Expand Down