Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v1] test: flaky replication/replica_rejoin.test.lua
Date: Tue, 29 Sep 2020 16:47:57 +0300	[thread overview]
Message-ID: <68a49784105d96be398abae0e3f0684d878a4d5a.1601387191.git.avtikhon@tarantool.org> (raw)

On heavy loaded hosts found the following issue:

  [151] --- replication/replica_rejoin.result     Tue Sep 29 10:57:26 2020
  [151] +++ replication/replica_rejoin.reject     Tue Sep 29 10:57:48 2020
  [151] @@ -230,7 +230,12 @@
  [151]      return box.info ~= nil and box.info.replication[1] ~= nil
  [151]  end)
  [151]  ---
  [151] -- true
  [151] +- error: &quot;builtin/box/load_cfg.lua:601: Please call box.cfg{} first\nstack traceback:\n\tbuiltin/box/load_cfg.lua:601:
  [151] +    in function &apos;__index&apos;\n\t[string \&quot;return test_run:wait_cond(function()         ...\&quot;]:1:
  [151] +    in function &apos;cond&apos;\n\t/tmp/tnt/151_replication/test_run.lua:411: in function &lt;/tmp/tnt/151_replication/test_run.lua:404&gt;\n\t[C]:
  [151] +    in function &apos;pcall&apos;\n\tbuiltin/box/console.lua:402: in function &apos;eval&apos;\n\tbuiltin/box/console.lua:708:
  [151] +    in function &apos;repl&apos;\n\tbuiltin/box/console.lua:842: in function &lt;builtin/box/console.lua:828&gt;\n\t[C]:
  [151] +    in function &apos;pcall&apos;\n\tbuiltin/socket.lua:1081: in function &lt;builtin/socket.lua:1079&gt;&quot;
  [151]  ...
  [151]  test_run:wait_upstream(1, {message_re = &apos;Missing %.xlog file&apos;, status = &apos;loading&apos;})
  [151]  ---
  [151]

It happened because box.cfg was not ready to provide information. In
real there is no need to use local check for replication information
parts availablity, due to wait_upstream() function used below, do it
itself.

Part of #4985
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/flaky-checksums
Issue: https://github.com/tarantool/tarantool/issues/4985

 test/replication/replica_rejoin.result   | 8 --------
 test/replication/replica_rejoin.test.lua | 5 -----
 2 files changed, 13 deletions(-)

diff --git a/test/replication/replica_rejoin.result b/test/replication/replica_rejoin.result
index f6e74eae1..4d9e83868 100644
--- a/test/replication/replica_rejoin.result
+++ b/test/replication/replica_rejoin.result
@@ -221,14 +221,6 @@ test_run:cmd("switch replica")
 ---
 - true
 ...
--- Need to wait for box.info.replication[1] defined, otherwise test-run fails to
--- wait for the upstream status sometimes.
-test_run:wait_cond(function()                                                   \
-    return box.info ~= nil and box.info.replication[1] ~= nil                   \
-end)
----
-- true
-...
 test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
 ---
 - true
diff --git a/test/replication/replica_rejoin.test.lua b/test/replication/replica_rejoin.test.lua
index 0feea152e..599a52988 100644
--- a/test/replication/replica_rejoin.test.lua
+++ b/test/replication/replica_rejoin.test.lua
@@ -81,11 +81,6 @@ test_run:wait_cond(function() return #fio.glob(fio.pathjoin(box.cfg.wal_dir, '*.
 box.cfg{checkpoint_count = checkpoint_count}
 test_run:cmd("start server replica with args='true', wait=False")
 test_run:cmd("switch replica")
--- Need to wait for box.info.replication[1] defined, otherwise test-run fails to
--- wait for the upstream status sometimes.
-test_run:wait_cond(function()                                                   \
-    return box.info ~= nil and box.info.replication[1] ~= nil                   \
-end)
 test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
 box.space.test:select()
 
-- 
2.25.1

             reply	other threads:[~2020-09-29 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 13:47 Alexander V. Tikhonov [this message]
2020-09-29 13:49 ` [Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (1) Alexander V. Tikhonov
2020-10-01 22:10   ` Vladislav Shpilevoy
2020-09-29 13:49 ` [Tarantool-patches] [PATCH v1] test: move error messages for tests into logs (2) Alexander V. Tikhonov
2020-10-01 22:10 ` [Tarantool-patches] [PATCH v1] test: flaky replication/replica_rejoin.test.lua Vladislav Shpilevoy
  -- strict thread matches above, loose matches on Subject: below --
2020-09-29 12:57 Alexander V. Tikhonov

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=68a49784105d96be398abae0e3f0684d878a4d5a.1601387191.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1] test: flaky replication/replica_rejoin.test.lua' \
    /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