-
Notifications
You must be signed in to change notification settings - Fork 60
test: fix execution with Tarantool 1.6 #198
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,8 +118,8 @@ func Example_customUnpacking() { | |
fmt.Println("Tuples (tuples2):", tuples2) | ||
|
||
// Call a function "func_name" returning a table of custom tuples. | ||
var tuples3 [][]Tuple3 | ||
err = conn.Call17Typed("func_name", []interface{}{}, &tuples3) | ||
var tuples3 []Tuple3 | ||
err = conn.Call16Typed("func_name", []interface{}{}, &tuples3) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I really don't like about CALL_16: it implicitly changes a shape of the result (and the rules are not very obvious). Personally I would avoid it as much as possible. Or at least call only those functions, which return exactly what we'll receive on the connector side: so it will not be wrapped into an array or unwrapped. Maybe skipping of some tests is not so evil as pollute them with CALL_16. I don't insist, just share my feeling about this. |
||
if err != nil { | ||
log.Fatalf("Failed to CallTyped: %s", err.Error()) | ||
return | ||
|
@@ -131,6 +131,6 @@ func Example_customUnpacking() { | |
// Code 0 | ||
// Tuples (tuples1) [{777 orig [{lol 1} {wut 3}]}] | ||
// Tuples (tuples2): [{{} 777 orig [{lol 1} {wut 3}]}] | ||
// Tuples (tuples3): [[{{} 221 [{Moscow 34} {Minsk 23} {Kiev 31}]}]] | ||
// Tuples (tuples3): [{{} 221 [{Moscow 34} {Minsk 23} {Kiev 31}]}] | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,7 +187,7 @@ func (connMulti *ConnectionMulti) checker() { | |
continue | ||
} | ||
var resp [][]string | ||
err := connMulti.Call17Typed(connMulti.opts.NodesGetFunctionName, []interface{}{}, &resp) | ||
err := connMulti.Call16Typed(connMulti.opts.NodesGetFunctionName, []interface{}{}, &resp) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not a strict equivalent, see tarantool/tarantool-java#196. |
||
if err != nil { | ||
continue | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. I would do the following instead:
I don't insist: if it works, it is likely okay. However we can do it a bit better (faster, more durable, less code).