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 853EA6FC87; Wed, 29 Sep 2021 02:10:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 853EA6FC87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632870604; bh=gMHAzD5L27xGNBLbTS1g3YGLhYGUQG1ikYH86brFFVU=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=PQamfFfP4xHb27NAHx438XYXXXgn8JXMjmlI6BPkP4/TqkQFBUP7KcoexE2dZnldo A6rqlUFfAVEJHOxz729KbHFBmdxBkS0MFnEUCT4VnCzIfweeaLrvkJH2cOms1ubeTM psQ3/sQYEgm77jnGFcmTamOsVPJwGXCTVQA6XBNw= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 EA1656DB05 for ; Wed, 29 Sep 2021 02:09:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EA1656DB05 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mVMDc-0004Sd-63; Wed, 29 Sep 2021 02:09:00 +0300 To: tarantool-patches@dev.tarantool.org, olegrok@tarantool.org Date: Wed, 29 Sep 2021 01:08:57 +0200 Message-Id: <38d1fce83b3b4494f10e71facf7619b31cd58662.1632870481.git.v.shpilevoy@tarantool.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96A58C36AA2E99649E150573C3DCDB29943BD5C8B56246B79182A05F53808504084F269B45E029116181EBF60498B88ADB5B88D0D8837847CAA013280FDDD7B91 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73B44982FA5E78411EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B1BE0CF094621A628638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8334B6F177A4A22879AFCFF54F342F080117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55B19328CBC4F849A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FCB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B50578EFA2BBF9A5316F92E99B13A80AAA81 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FC12140A200D23646564A64F55EA811255F8157E4B4836C84BB1881A6453793CE9C32612AADDFBE061C801D989C91DAA47C32612AADDFBE0614AFB60FD1831C04C9510FB958DCE06DB6ED91DBE5ABE359A7EE5648E065588D41B2EFE7B39F7738393EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F1ADD4D8CD3C81CEFF3E571F0295697FE072F359DE4FAC7E1ECA5A6F2B565888635332F63BC8416B1D7E09C32AA3244C89E964EB09434F0236961B54D2ADA7D56C24832127668422729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojWaDhU1ub98ZBUBAZfBIYBg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D88A871DBA2B8526D376E49CD7EE2F0123841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: [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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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!' ... -- -- 2.24.3 (Apple Git-128)