From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (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 8931442EF5C for ; Fri, 3 Jul 2020 01:46:14 +0300 (MSK) Date: Fri, 3 Jul 2020 01:46:12 +0300 From: Sergey Bronnikov Message-ID: <20200702224612.GB5305@pony.bronevichok.ru> References: <012c8c196396cf963a0aa1f2d23814ff84b81cfb.1593723973.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <012c8c196396cf963a0aa1f2d23814ff84b81cfb.1593723973.git.sergeyb@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/4] replication: add advanced tests for sync replication List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, sergepetrenko@tarantool.org, gorcunov@gmail.com, lvasiliev@tarantool.org Forgot to fix unreliable piece of code in a test that makes test flaky. Changes with fix are below, branch contains updated commit. diff --git a/test/replication/qsync_advanced.result b/test/replication/qsync_advanced.result index fa94c8339..53722c3f9 100644 --- a/test/replication/qsync_advanced.result +++ b/test/replication/qsync_advanced.result @@ -663,7 +663,7 @@ box.space.sync:drop() | --- | ... --- check behaviour with failed write to WAL on master (ERRINJ_WAL_IO) +-- Check behaviour with failed write to WAL on master (ERRINJ_WAL_IO). -- Testcase setup. test_run:switch('default') | --- @@ -849,15 +849,8 @@ test_run:switch('default') | - true | ... -- Enable synchronous mode. -s = box.space._space:get(box.space.sync.id) - | --- - | ... -new_s = s:update({{'=', 6, {is_sync=true}}}) - | --- - | ... -box.space._space:replace(new_s) +disable_sync_mode() | --- - | - [523, 1, 'sync', 'vinyl', 0, {'is_sync': true}, []] | ... -- Space is in sync mode now. box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=0.1} @@ -867,41 +860,28 @@ box.space.sync:insert{2} -- success | --- | - [2] | ... -box.space.sync:insert{3} -- success - | --- - | - [3] - | ... box.cfg{replication_synchro_quorum=BROKEN_QUORUM, replication_synchro_timeout=0.1} | --- | ... -box.space.sync:insert{4} -- failure - | --- - | - error: Quorum collection for a synchronous transaction is timed out - | ... -box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=0.1} - | --- - | ... -box.space.sync:insert{5} -- success +box.space.sync:insert{3} -- success | --- - | - [5] + | - [3] | ... -box.space.sync:select{} -- 1, 2, 3, 5 +box.space.sync:select{} -- 1, 2, 3 | --- | - - [1] | - [2] | - [3] - | - [5] | ... test_run:cmd('switch replica') | --- | - true | ... -box.space.sync:select{} -- 1, 2, 3, 5 +box.space.sync:select{} -- 1, 2, 3 | --- | - - [1] | - [2] | - [3] - | - [5] | ... -- Testcase cleanup. test_run:switch('default') diff --git a/test/replication/qsync_advanced.test.lua b/test/replication/qsync_advanced.test.lua index 270fd494d..9633ceb6c 100644 --- a/test/replication/qsync_advanced.test.lua +++ b/test/replication/qsync_advanced.test.lua @@ -307,20 +307,15 @@ test_run:cmd('switch replica') box.space.sync:select{} -- 1 test_run:switch('default') -- Enable synchronous mode. -s = box.space._space:get(box.space.sync.id) -new_s = s:update({{'=', 6, {is_sync=true}}}) -box.space._space:replace(new_s) +disable_sync_mode() -- Space is in sync mode now. box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=0.1} box.space.sync:insert{2} -- success -box.space.sync:insert{3} -- success box.cfg{replication_synchro_quorum=BROKEN_QUORUM, replication_synchro_timeout=0.1} -box.space.sync:insert{4} -- failure -box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=0.1} -box.space.sync:insert{5} -- success -box.space.sync:select{} -- 1, 2, 3, 5 +box.space.sync:insert{3} -- success +box.space.sync:select{} -- 1, 2, 3 test_run:cmd('switch replica') -box.space.sync:select{} -- 1, 2, 3, 5 +box.space.sync:select{} -- 1, 2, 3 -- Testcase cleanup. test_run:switch('default') box.space.sync:drop() On 00:13 Fri 03 Jul , sergeyb@tarantool.org wrote: > From: Sergey Bronnikov > > Part of #5055 > --- > test/replication/qsync_advanced.result | 939 +++++++++++++++++++++++ > test/replication/qsync_advanced.test.lua | 337 ++++++++ > 2 files changed, 1276 insertions(+) > create mode 100644 test/replication/qsync_advanced.result > create mode 100644 test/replication/qsync_advanced.test.lua