From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: sergeyb@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: Wed, 25 Nov 2020 23:02:28 +0100 [thread overview]
Message-ID: <ea46f682-cb92-c759-129a-f41bb0ee202d@tarantool.org> (raw)
In-Reply-To: <ada63b17702e8be6f223788368309767228b8102.1605629206.git.sergeyb@tarantool.org>
Thanks for the patch!
> diff --git a/test/replication/qsync_sync_mode.result b/test/replication/qsync_sync_mode.result
> new file mode 100644
> index 000000000..66f6a70b2
> --- /dev/null
> +++ b/test/replication/qsync_sync_mode.result
> @@ -0,0 +1,114 @@
> +test_run:cmd('start server replica with wait=True, wait_load=True')
> + | ---
> + | - true
> + | ...
> +
> +-- Write data to a leader and enable/disable sync mode in a loop.
> +-- Testcase setup.
> +_ = box.schema.space.create('sync', {is_sync=true, engine=engine})
> + | ---
> + | ...
> +_ = box.space.sync:create_index('pk')
> + | ---
> + | ...
> +box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=1000}
> + | ---
> + | ...
> +
> +-- Testcase body.
> +for i = 1,100 do \
> + box.space.sync:alter{is_sync=random_boolean()} \
I thought about it more, and I realized that it does not make
much sense to test alter of kind true -> true, and false -> false.
Maybe better simply change it to negative on each iteration.
Also if the sync mode is true, wait_cond is supposed to be not
needed. That is the purpose of the sync. Currently your test will
pass even if I will simply remove is_sync option at all.
> + box.space.sync:insert{i} \
> + test_run:switch('replica') \
> + test_run:wait_cond(function() return box.space.sync:get{i} ~= nil end) \
> + test_run:switch('default') \
> + test_run:wait_cond(function() return box.space.sync:get{i} ~= nil end) \
> +end
> + | ---
> + | ...
> +box.space.sync:count() -- 100
> + | ---
> + | - 100
> + | ...
prev parent reply other threads:[~2020-11-25 22:02 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
2020-11-25 22:02 ` Vladislav Shpilevoy [this message]
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=ea46f682-cb92-c759-129a-f41bb0ee202d@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=tarantool-patches@dev.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