From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 A06FC445326 for ; Thu, 16 Jul 2020 23:38:18 +0300 (MSK) From: Vladislav Shpilevoy Date: Thu, 16 Jul 2020 22:38:13 +0200 Message-Id: <589b7e99d1e67d512bf166bf6b41262fff56d357.1594931843.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 4/4] test: fix flaky qsync_basic.test.lua List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, avtikhon@tarantool.org Too small timeouts were used for testing that synchronous transactions succeed. Follow-up #5162 --- test/replication/qsync_basic.result | 6 +++--- test/replication/qsync_basic.test.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/replication/qsync_basic.result b/test/replication/qsync_basic.result index b355a5c06..bd3c3cce1 100644 --- a/test/replication/qsync_basic.result +++ b/test/replication/qsync_basic.result @@ -96,7 +96,7 @@ old_synchro_quorum = box.cfg.replication_synchro_quorum old_synchro_timeout = box.cfg.replication_synchro_timeout | --- | ... -box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=0.1} +box.cfg{replication_synchro_quorum = 2, replication_synchro_timeout = 1000} | --- | ... @@ -130,7 +130,7 @@ box.info.lsn - lsn | - 2 | ... -- Raise quorum so that master has to issue a ROLLBACK. -box.cfg{replication_synchro_quorum=3} +box.cfg{replication_synchro_quorum = 3, replication_synchro_timeout = 0.001} | --- | ... t = fiber.time() @@ -145,7 +145,7 @@ fiber.time() - t > box.cfg.replication_synchro_timeout | --- | - true | ... -box.cfg{replication_synchro_quorum=2} +box.cfg{replication_synchro_quorum = 2, replication_synchro_timeout = 1000} | --- | ... box.space.sync:insert{3} diff --git a/test/replication/qsync_basic.test.lua b/test/replication/qsync_basic.test.lua index 205fb0664..94235547d 100644 --- a/test/replication/qsync_basic.test.lua +++ b/test/replication/qsync_basic.test.lua @@ -40,7 +40,7 @@ box.schema.user.grant('guest', 'replication') -- Set up synchronous replication options. old_synchro_quorum = box.cfg.replication_synchro_quorum old_synchro_timeout = box.cfg.replication_synchro_timeout -box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=0.1} +box.cfg{replication_synchro_quorum = 2, replication_synchro_timeout = 1000} test_run:cmd('create server replica with rpl_master=default,\ script="replication/replica.lua"') @@ -54,12 +54,12 @@ box.space.sync:insert{1} -- 1 for insertion, 1 for CONFIRM message. box.info.lsn - lsn -- Raise quorum so that master has to issue a ROLLBACK. -box.cfg{replication_synchro_quorum=3} +box.cfg{replication_synchro_quorum = 3, replication_synchro_timeout = 0.001} t = fiber.time() box.space.sync:insert{2} -- Check that master waited for acks. fiber.time() - t > box.cfg.replication_synchro_timeout -box.cfg{replication_synchro_quorum=2} +box.cfg{replication_synchro_quorum = 2, replication_synchro_timeout = 1000} box.space.sync:insert{3} box.space.sync:select{} -- 2.21.1 (Apple Git-122.3)