Skip to content

Commit

Permalink
Add 3.3.1 release (#238)
Browse files Browse the repository at this point in the history
* add codecov (#230)

* add codecov

* add codecov badge

* fix: Close connection when remove it (#231)

Close deprecated connections from idle queue to avoid leaks.

* Return valid JSON format for profiling data (#236)

* Update thrift with v3.3 core release (#237)

* Update thrift files to v3.3 core

* Comment out test

* Fix typo

Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com>
Co-authored-by: Soy <z2690108@gmail.com>
Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
  • Loading branch information
4 people authored Nov 21, 2022
1 parent 319c0b1 commit 15d1e34
Show file tree
Hide file tree
Showing 11 changed files with 2,641 additions and 865 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
make up
sleep 10
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: down
if: always()
run: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Go Reference](https://pkg.go.dev/badge/github.com/vesoft-inc/nebula-go/v3.svg)](https://pkg.go.dev/github.com/vesoft-inc/nebula-go/v3)
![functional tests](https://github.com/vesoft-inc/nebula-go/actions/workflows/test.yaml/badge.svg)
[![codecov](https://codecov.io/gh/vesoft-inc/nebula-go/branch/master/graph/badge.svg?token=dzUo5KdSux)](https://codecov.io/gh/vesoft-inc/nebula-go)

**IMPORTANT: Code of Nebula go client has been transferred from [nebula-clients](https://github.com/vesoft-inc/nebula-clients) to this repository(nebula-go), and new releases in the future will be published in this repository.
Please update your go.mod and imports correspondingly.**
Expand Down
68 changes: 36 additions & 32 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,38 +1147,42 @@ func TestExecuteWithParameter(t *testing.T) {
col3)
}
// Complex result
{
resp, err := tryToExecuteWithParameter(session, "MATCH (v:person {name: $p4.b}) WHERE v.person.age>$p2-3 and $p1==true RETURN v ORDER BY $p3[0] LIMIT $p2", params)
if err != nil {
t.Fatalf(err.Error())
return
}
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())
}
// 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())
// }
}

func TestReconnect(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func (pool *ConnectionPool) getIdleConn() (*connection, error) {
} else {
tmpNextEle = ele.Next()
pool.idleConnectionQueue.Remove(ele)
ele.Value.(*connection).close()
}
}
if newConn == nil {
Expand Down
370 changes: 185 additions & 185 deletions nebula/meta/metaservice.go

Large diffs are not rendered by default.

Loading

0 comments on commit 15d1e34

Please sign in to comment.