Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1] test: fix status at replication/misc*4424* test
@ 2020-09-03 14:10 Alexander V. Tikhonov
  2020-09-03 14:15 ` Serge Petrenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander V. Tikhonov @ 2020-09-03 14:10 UTC (permalink / raw)
  To: Kirill Yukhin, Serge Petrenko; +Cc: Mergen Imeev, tarantool-patches

Fixed flaky status check:

  [016] @@ -73,11 +73,11 @@
  [016]  ...
  [016]  box.info.status
  [016]  ---
  [016] -- running
  [016] +- orphan
  [016]  ...
  [016]  box.info.ro
  [016]  ---
  [016] -- false
  [016] +- true
  [016]  ...
  [016]  box.cfg{                                                        \
  [016]      replication = {},                                           \
  [016]

Test changed to use wait condition for the status check, which should
be changed from 'orphan' to 'running'. On heavy loaded hosts it may
spend some additional time, wait condition routine helped to fix it.

Closes #5271
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4940-replication-misc
Issue: https://github.com/tarantool/tarantool/issues/5271

 .../misc_orphan_on_reconfiguration_error_gh-4424.result   | 8 ++------
 .../misc_orphan_on_reconfiguration_error_gh-4424.test.lua | 3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.result b/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.result
index c87ef2e05..110a0232d 100644
--- a/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.result
+++ b/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.result
@@ -65,13 +65,9 @@ box.info.ro
 box.cfg{replication_connect_quorum=1}
 ---
 ...
-box.info.status
+test_run:wait_cond(function() return box.info.status == 'running' and box.info.ro == false end)
 ---
-- running
-...
-box.info.ro
----
-- false
+- true
 ...
 box.cfg{                                                        \
     replication = {},                                           \
diff --git a/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.test.lua b/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.test.lua
index 6f42863c3..e35515aa5 100644
--- a/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.test.lua
+++ b/test/replication/misc_orphan_on_reconfiguration_error_gh-4424.test.lua
@@ -25,8 +25,7 @@ box.info.status
 box.info.ro
 -- lower quorum => leave orphan mode
 box.cfg{replication_connect_quorum=1}
-box.info.status
-box.info.ro
+test_run:wait_cond(function() return box.info.status == 'running' and box.info.ro == false end)
 
 box.cfg{                                                        \
     replication = {},                                           \
-- 
2.17.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-09 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 14:10 [Tarantool-patches] [PATCH v1] test: fix status at replication/misc*4424* test Alexander V. Tikhonov
2020-09-03 14:15 ` Serge Petrenko
2020-09-09 11:44 ` Kirill Yukhin
2020-09-09 11:53 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox