Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov <sergeyb@tarantool.org>
To: tarantool-patches@dev.tarantool.org,
	Serge Petrenko <sergepetrenko@tarantool.org>,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH 2/3 v2] replication: add test with random leaders promotion and demotion
Date: Mon, 16 Nov 2020 17:00:08 +0300	[thread overview]
Message-ID: <47897821-0f33-b0b4-8340-f670e08261d6@tarantool.org> (raw)
In-Reply-To: <6db1b311-c989-6a1d-52fe-ca5b78552a75@tarantool.org>


On 16.11.2020 12:10, Sergey Bronnikov wrote:
>
>  test_run:switch('qsync1')
> -box.space.sync:count() -- 300
> +box.space.sync:count() -- 200
>
sometimes this statement failed with:

[007] replication/qsync_random_leader.test.lua memtx           [ fail ]
[007]
[007] Test failed! Result content mismatch:
[007] --- replication/qsync_random_leader.result        Mon Nov 16 
08:41:46 2020
[007] +++ 
/home/s.bronnikov/work/tarantool/build/test/var/rejects/replication/qsync_random_leader.reject 
Mon Nov 16 09:57:34 2020
[007] @@ -128,7 +128,7 @@
[007]   | ...
[007]  box.space.sync:count() -- 200
[007]   | ---
[007] - | - 200
[007] + | - 199
[007]   | ...
[007]
[007]  -- Teardown.

so I replace it with wait_cond():

--- a/test/replication/qsync_random_leader.test.lua
+++ b/test/replication/qsync_random_leader.test.lua
@@ -63,8 +63,8 @@ for i=1,200 do \
      current_leader_id = 
new_leader_id                                          \
  end

-test_run:switch('qsync1')
-box.space.sync:count() -- 200
+test_run:wait_cond(function() return test_run:eval('qsync1', \
+                   ("box.space.sync:count()")) == 200 end)  \

  -- Teardown.
  test_run:switch('default')

  reply	other threads:[~2020-11-16 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12  9:10 [Tarantool-patches] [PATCH 0/3 v2] Additional qsync tests sergeyb
2020-11-12  9:10 ` [Tarantool-patches] [PATCH 1/3 v2] replication: test clear_synchro_queue() function sergeyb
2020-11-13 13:12   ` Serge Petrenko
2020-11-16 11:11     ` Sergey Bronnikov
2020-11-16 14:44       ` Serge Petrenko
2020-11-12  9:10 ` [Tarantool-patches] [PATCH 2/3 v2] replication: add test with random leaders promotion and demotion sergeyb
2020-11-13 15:10   ` Serge Petrenko
2020-11-16  9:10     ` Sergey Bronnikov
2020-11-16 14:00       ` Sergey Bronnikov [this message]
2020-11-16 14:48         ` Serge Petrenko
2020-11-16 14:53           ` Serge Petrenko
2020-11-16 16:04             ` Sergey Bronnikov
2020-11-12  9:11 ` [Tarantool-patches] [PATCH 3/3 v2] replication: add test with change space sync mode in a loop sergeyb
2020-11-13 14:05   ` Serge Petrenko

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=47897821-0f33-b0b4-8340-f670e08261d6@tarantool.org \
    --to=sergeyb@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 2/3 v2] replication: add test with random leaders promotion and demotion' \
    /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