From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 03C3E6FC87; Wed, 29 Sep 2021 09:19:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 03C3E6FC87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632896359; bh=5rh60Kcnoh/wwYYaRf80NXd/FN4AE7mUwgMXAo9eooY=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=egNysYXeq84zLwcMZKL+YaXV7RfyLeA5aJ1T/dJ/dsaBeZDV59dHi121WNVzUDdUz NeiTiqOOUdW5SItr0+f8ZPP2g0t720TE7i3tnx56flpPO+qUF/QnIlPycpov4zUmYj kdbM3Q5cbPB/kI1Na4KSBfLUaSCRofbWHHor7oTk= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 345686DB09 for ; Wed, 29 Sep 2021 09:18:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 345686DB09 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1mVSvZ-0008E3-GQ; Wed, 29 Sep 2021 09:18:50 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org References: <38d1fce83b3b4494f10e71facf7619b31cd58662.1632870481.git.v.shpilevoy@tarantool.org> Message-ID: Date: Wed, 29 Sep 2021 09:18:49 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <38d1fce83b3b4494f10e71facf7619b31cd58662.1632870481.git.v.shpilevoy@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96A58C36AA2E99649BF631F26B0465AFD66E223DEB3A228DC182A05F5380850402345A18FFB59D43BCB717D3D6C0564EB95C29D225DE39201704E025EC0715AAF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79145AB6E9E75F07EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063786D6A7D810B9582D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86CA956D38AF3836C4E6913A1DDADC6E1117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEC24E1E72F37C03A04AAC223A686B1DECD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE313BDA61BF53F5E1DAD7EC71F1DB88427C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637A5C471A62FCE759D731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5DDF1CC939A53AEE639AA05B0AD5A8AB35F9957AC4F0BAC1CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75BFC02AB3DF06BA5A410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D347D10A9FCB2A62DFEBA37919E4FBE6AF39F8CE8D533FCCF18E60B288BCE94A6F3FB0D2A4543381A8A1D7E09C32AA3244C6B681B32C54F135E6FA90C501534D8083FD9C8CA1B0515E0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojWaDhU1ub98b8Y8hVcJe0IA== X-Mailru-Sender: 583F1D7ACE8F49BD1042885CEC987B6B48227EE01080349BCB717D3D6C0564EB79D0F6AC9C0BD8DB7019711D9D5B048E1458020726E2BC9FD5ECBA0B92C0A936CDC7563AA7CEBD287402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH vshard 2/2] test: drop error codes from test output X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Oleg Babin via Tarantool-patches Reply-To: Oleg Babin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for your patch. LGTM. On 29.09.2021 02:08, Vladislav Shpilevoy wrote: > In the newest Tarantool the error objects are encoded as MP_ERROR > in netbox connections by default. This allows to transfer their > full data including correct error code, even when returned as > nil,err instead of throwing the error as an exception. > > Because of that some vshard tests failed - they expected the error > codes returned from the server to be wrong. > > On the other hand, the codes can't be fixed, because then the > tests wouldn't work on 1.10. > > The patch just drops the codes. At least while need to support > Tarantool versions not using MP_ERROR in netbox by default. > --- > test/lua_libs/util.lua | 2 +- > test/misc/check_uuid_on_connect.result | 2 -- > test/rebalancer/bucket_ref.result | 1 - > test/rebalancer/receiving_bucket.result | 3 --- > test/router/retry_reads.result | 2 -- > test/router/router.result | 3 --- > test/router/sync.result | 2 -- > test/storage/storage.result | 1 - > test/unit/error.result | 2 -- > 9 files changed, 1 insertion(+), 17 deletions(-) > > diff --git a/test/lua_libs/util.lua b/test/lua_libs/util.lua > index 9c2e667..fe23065 100644 > --- a/test/lua_libs/util.lua > +++ b/test/lua_libs/util.lua > @@ -198,7 +198,7 @@ end > -- trimmed in order for the tests not to depend on line numbers of > -- the source files, which may slip into a .result file. > local function portable_error(err) > - return {code = err.code, type = err.type, message = err.message} > + return {type = err.type, message = err.message} > end > > return { > diff --git a/test/misc/check_uuid_on_connect.result b/test/misc/check_uuid_on_connect.result > index 6ebc5d0..8862e62 100644 > --- a/test/misc/check_uuid_on_connect.result > +++ b/test/misc/check_uuid_on_connect.result > @@ -45,7 +45,6 @@ res, util.portable_error(err) > --- > - null > - type: ClientError > - code: 77 > message: Connection closed > ... > test_run:grep_log('bad_uuid_1_a', 'Mismatch server UUID on replica bad_uuid_2_a%(storage%@') > @@ -174,7 +173,6 @@ res, util.portable_error(err) > --- > - null > - type: ClientError > - code: 77 > message: Connection closed > ... > -- Close existing connection on a first error and log it. > diff --git a/test/rebalancer/bucket_ref.result b/test/rebalancer/bucket_ref.result > index 9df7480..67ae5bc 100644 > --- a/test/rebalancer/bucket_ref.result > +++ b/test/rebalancer/bucket_ref.result > @@ -144,7 +144,6 @@ res, util.portable_error(err) > --- > - null > - type: ClientError > - code: 32 > message: Timeout exceeded > ... > vshard.storage.buckets_info(1) > diff --git a/test/rebalancer/receiving_bucket.result b/test/rebalancer/receiving_bucket.result > index ad93445..ae1da58 100644 > --- a/test/rebalancer/receiving_bucket.result > +++ b/test/rebalancer/receiving_bucket.result > @@ -167,7 +167,6 @@ res, util.portable_error(err) > --- > - null > - type: ClientError > - code: 32 > message: Error injection 'the bucket is received partially' > ... > box.space._bucket:get{1} > @@ -225,7 +224,6 @@ _, err = vshard.storage.bucket_send(101, util.replicasets[1], {timeout = 0.1}) > util.portable_error(err) > --- > - type: ClientError > - code: 78 > message: Timeout exceeded > ... > box.space._bucket:get{101} > @@ -332,7 +330,6 @@ ret, util.portable_error(err) > --- > - null > - type: ClientError > - code: 78 > message: Timeout exceeded > ... > finish_long_thing = true > diff --git a/test/router/retry_reads.result b/test/router/retry_reads.result > index fa38541..e5e721a 100644 > --- a/test/router/retry_reads.result > +++ b/test/router/retry_reads.result > @@ -118,7 +118,6 @@ fiber.time() - start < 1 > util.portable_error(e) > --- > - type: ClientError > - code: 0 > message: Unknown error > ... > _, e = rs1:callro('sleep', {1}, {timeout = 0.0001}) > @@ -127,7 +126,6 @@ _, e = rs1:callro('sleep', {1}, {timeout = 0.0001}) > util.portable_error(e) > --- > - type: ClientError > - code: 78 > message: Timeout exceeded > ... > -- > diff --git a/test/router/router.result b/test/router/router.result > index 8ddbe6d..f9bf649 100644 > --- a/test/router/router.result > +++ b/test/router/router.result > @@ -259,7 +259,6 @@ _, e = vshard.router.callro(1, 'raise_client_error', {}, {}) > util.portable_error(e) > --- > - type: ClientError > - code: 32 > message: Unknown error > ... > _, e = vshard.router.route(1):callro('raise_client_error', {}) > @@ -268,7 +267,6 @@ _, e = vshard.router.route(1):callro('raise_client_error', {}) > util.portable_error(e) > --- > - type: ClientError > - code: 0 > message: Unknown error > ... > -- Ensure, that despite not working multi-return, it is allowed > @@ -640,7 +638,6 @@ assert(type(err) == 'table') > util.portable_error(err) > --- > - type: ClientError > - code: 32 > message: Unknown error > ... > future:is_ready() > diff --git a/test/router/sync.result b/test/router/sync.result > index 040d611..164861e 100644 > --- a/test/router/sync.result > +++ b/test/router/sync.result > @@ -51,7 +51,6 @@ res, err = vshard.router.sync(-1) > util.portable_error(err) > --- > - type: ClientError > - code: 78 > message: Timeout exceeded > ... > res, err = vshard.router.sync(0) > @@ -60,7 +59,6 @@ res, err = vshard.router.sync(0) > util.portable_error(err) > --- > - type: ClientError > - code: 78 > message: Timeout exceeded > ... > -- > diff --git a/test/storage/storage.result b/test/storage/storage.result > index acae98f..af48a13 100644 > --- a/test/storage/storage.result > +++ b/test/storage/storage.result > @@ -514,7 +514,6 @@ res, err = vshard.storage.bucket_recv(4, util.replicasets[2], {{1000, {{1}}}}) > util.portable_error(err) > --- > - type: ClientError > - code: 36 > message: Space '1000' does not exist > ... > while box.space._bucket:get{4} do vshard.storage.recovery_wakeup() fiber.sleep(0.01) end > diff --git a/test/unit/error.result b/test/unit/error.result > index 738cfeb..bb4e0cc 100644 > --- a/test/unit/error.result > +++ b/test/unit/error.result > @@ -28,7 +28,6 @@ str = tostring(box_error) > util.portable_error(json.decode(str)) > --- > - type: ClientError > - code: 78 > message: Timeout exceeded > ... > vshard_error = lerror.vshard(lerror.code.UNREACHABLE_MASTER, 'uuid', 'reason') > @@ -94,7 +93,6 @@ err = lerror.make(err) > util.portable_error(err) > --- > - type: ClientError > - code: 32 > message: '[string "function raise_lua_err() assert(false) end "]:1: assertion failed!' > ... > --