Skip to content

Commit 6c9d6a0

Browse files
Gumixoleg-jukovec
authored andcommitted
tests: fix arrow.TestInsert_invalid
The handling of incorrect Arrow data changed in Tarantool [1], now a CustomError with the code 4 is returned instead of ClientError with the code 20 (ER_INVALID_MSGPACK). Need to update the test. [1]: tarantool/tarantool#12482
1 parent a698ef8 commit 6c9d6a0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

arrow/tarantool_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ var opts = tarantool.Opts{
3030
Timeout: 5 * time.Second,
3131
}
3232

33+
// Invalid Arrow request results in CustomError with errcode = 4.
34+
const invalidArrowCode = 4
35+
3336
// TestInsert uses Arrow sequence from Tarantool's test.
3437
// See: https://github.com/tarantool/tarantool/blob/d628b71bc537a75b69c253f45ec790462cf1a5cd/test/box-luatest/gh_10508_iproto_insert_arrow_test.lua#L56
3538
func TestInsert_invalid(t *testing.T) {
@@ -39,11 +42,11 @@ func TestInsert_invalid(t *testing.T) {
3942
}{
4043
{
4144
"",
42-
[]iproto.Error{iproto.ER_INVALID_MSGPACK},
45+
[]iproto.Error{invalidArrowCode, iproto.ER_INVALID_MSGPACK},
4346
},
4447
{
4548
"00",
46-
[]iproto.Error{iproto.ER_INVALID_MSGPACK},
49+
[]iproto.Error{invalidArrowCode, iproto.ER_INVALID_MSGPACK},
4750
},
4851
{
4952
"ffffffff70000000040000009effffff0400010004000000" +

0 commit comments

Comments
 (0)