[tarantool-patches] Re: [PATCH v1 5/6] Test misc tunning
Alexander Turenko
alexander.turenko at tarantool.org
Wed Apr 10 15:29:02 MSK 2019
I reworked the commit according to comments below.
On the branch Totktonada/test-replication-fix-flaky-fails.
WBR, Alexander Turenko.
On Mon, Apr 01, 2019 at 05:13:34PM +0300, avtikhon wrote:
> From: avtikhon <avtikhon at gmail.com>
>
> ---
> test/replication/misc.result | 16 ++++++++--------
> test/replication/misc.test.lua | 16 ++++++++--------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/test/replication/misc.test.lua b/test/replication/misc.test.lua
> index f60eec526..d056d30a1 100644
> --- a/test/replication/misc.test.lua
> +++ b/test/replication/misc.test.lua
> @@ -43,27 +43,27 @@ test_run:create_cluster(SERVERS, "replication", {args="0.1"})
> test_run:wait_fullmesh(SERVERS)
> test_run:cmd("switch misc1")
> test_run = require('test_run').new()
> -box.cfg{replication_timeout = 0.01, replication_connect_timeout=0.01}
> +box.cfg{replication_timeout = 0.03, replication_connect_timeout=0.03}
We can set replication_connect_timeout to 30 seconds here as in other
tests.
I had a question why replication_timeout is set to 0.03, while it is 0.1
in other tests. Now I understood that it increases duration of the test
case about heartbeats. Such unobvious points need to be commented in a
commit message.
> test_run:cmd("switch misc2")
> test_run = require('test_run').new()
> -box.cfg{replication_timeout = 0.01, replication_connect_timeout=0.01}
> +box.cfg{replication_timeout = 0.03, replication_connect_timeout=0.03}
> test_run:cmd("switch misc3")
> test_run = require('test_run').new()
> fiber=require('fiber')
> -box.cfg{replication_timeout = 0.01, replication_connect_timeout=0.01}
> +box.cfg{replication_timeout = 0.03, replication_connect_timeout=0.03}
> _ = box.schema.space.create('test_timeout'):create_index('pk')
> test_run:cmd("setopt delimiter ';'")
> function wait_follow(replicaA, replicaB)
> return test_run:wait_cond(function()
> return replicaA.status ~= 'follow' or replicaB.status ~= 'follow'
> - end, 0.01)
> + end, 0.1)
I would use box.cfg.replication_timeout value here explicitly.
> end ;
> function test_timeout()
> local replicaA = box.info.replication[1].upstream or box.info.replication[2].upstream
> local replicaB = box.info.replication[3].upstream or box.info.replication[2].upstream
> local follows = test_run:wait_cond(function()
> return replicaA.status == 'follow' or replicaB.status == 'follow'
> - end, 0.1)
> + end, 1)
We can just leave the timeout here to use default 60 seconds.
> if not follows then error('replicas not in follow status') end
> for i = 0, 99 do
> box.space.test_timeout:replace({1})
> @@ -166,7 +166,7 @@ fiber.sleep(0.1)
> box.schema.user.create('cluster', {password='pass'})
> box.schema.user.grant('cluster', 'replication')
>
> -while box.info.replication[2] == nil do fiber.sleep(0.01) end
> +while box.info.replication[2] == nil do fiber.sleep(0.03) end
I don't think this can change any behaviour.
> vclock = test_run:get_vclock('default')
> _ = test_run:wait_vclock('misc_gh3637', vclock)
>
> @@ -194,12 +194,12 @@ listen = box.cfg.listen
> box.cfg{listen = ''}
>
> test_run:cmd("switch misc_gh3610")
> -box.cfg{replication_connect_quorum = 0, replication_connect_timeout = 0.01}
> +box.cfg{replication_connect_quorum = 0, replication_connect_timeout = 0.03}
Can we use standard 30 seconds here?
> box.cfg{replication = {replication, replication}}
>
> test_run:cmd("switch default")
> box.cfg{listen = listen}
> -while test_run:grep_log('misc_gh3610', 'duplicate connection') == nil do fiber.sleep(0.01) end
> +while test_run:grep_log('misc_gh3610', 'duplicate connection') == nil do fiber.sleep(0.03) end
I don't think this can change any behaviour.
>
> test_run:cmd("stop server misc_gh3610")
> test_run:cmd("cleanup server misc_gh3610")
> --
> 2.17.1
>
More information about the Tarantool-patches
mailing list