From: Sergey Bronnikov <sergeyb@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 4/4] replication: add test with change space sync mode in a loop
Date: Mon, 23 Nov 2020 18:42:33 +0300 [thread overview]
Message-ID: <f9752ac8-6fc0-07c4-3de3-75b92aeb1e18@tarantool.org> (raw)
In-Reply-To: <ef12777e-2cd9-af63-8352-93477246f3c6@tarantool.org>
Thanks for review!
On 21.11.2020 17:41, Vladislav Shpilevoy wrote:
> Thanks for the patch!
>
>> +++ b/test/replication/qsync_sync_mode.result
>> @@ -0,0 +1,114 @@
>> +-- test-run result file version 2
>> +env = require('test_run')
>> + | ---
>> + | ...
>> +test_run = env.new()
>> + | ---
>> + | ...
>> +engine = test_run:get_cfg('engine')
>> + | ---
>> + | ...
>> +fiber = require('fiber')
>> + | ---
>> + | ...
>> +math = require('math')
>> + | ---
>> + | ...
>> +
>> +orig_synchro_quorum = box.cfg.replication_synchro_quorum
>> + | ---
>> + | ...
>> +orig_synchro_timeout = box.cfg.replication_synchro_timeout
>> + | ---
>> + | ...
>> +
>> +math.randomseed(os.time())
>> + | ---
>> + | ...
>> +random_boolean = function() \
>> + if (math.random(1, 10) > 5) then \
> In Lua we don't use () in if conditions. Also you could simply
> 'return math.random(1, 10) > 5'.
Agree. Also updated format of function.
--- a/test/replication/qsync_sync_mode.test.lua
+++ b/test/replication/qsync_sync_mode.test.lua
@@ -8,12 +8,8 @@ orig_synchro_quorum = box.cfg.replication_synchro_quorum
orig_synchro_timeout = box.cfg.replication_synchro_timeout
math.randomseed(os.time())
-random_boolean =
function() \
- if (math.random(1, 10) > 5)
then \
- return
true \
- else \
- return
false \
- end \
+function random_boolean() \
+ return math.random(1, 10) >
5 \
end
box.schema.user.grant('guest', 'replication')
>> + return true \
>> + else \
>> + return false \
>> + end \
>> +end
next prev parent reply other threads:[~2020-11-23 15:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 16:13 [Tarantool-patches] [PATCH 0/4 v3] Additional qsync tests sergeyb
2020-11-17 16:13 ` [Tarantool-patches] [PATCH 1/4] replication: run clear_synchro_queue() with unconfigured box sergeyb
2020-11-21 14:41 ` Vladislav Shpilevoy
2020-11-23 14:44 ` Sergey Bronnikov
2020-11-17 16:13 ` [Tarantool-patches] [PATCH 2/4] replication: test clear_synchro_queue() function sergeyb
2020-11-21 14:41 ` Vladislav Shpilevoy
2020-11-23 15:13 ` Sergey Bronnikov
2020-11-17 16:13 ` [Tarantool-patches] [PATCH 3/4] replication: add test with random leaders promotion and demotion sergeyb
2020-11-21 14:41 ` Vladislav Shpilevoy
2020-11-24 8:39 ` Sergey Bronnikov
2020-11-25 22:02 ` Vladislav Shpilevoy
2020-11-17 16:13 ` [Tarantool-patches] [PATCH 4/4] replication: add test with change space sync mode in a loop sergeyb
2020-11-21 14:41 ` Vladislav Shpilevoy
2020-11-23 15:42 ` Sergey Bronnikov [this message]
2020-11-25 22:02 ` Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9752ac8-6fc0-07c4-3de3-75b92aeb1e18@tarantool.org \
--to=sergeyb@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 4/4] replication: add test with change space sync mode in a loop' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox