[Tarantool-patches] [PATCH v1] test: fix status at replication/misc*4424* test

Alexander V. Tikhonov avtikhon at tarantool.org
Thu Sep 3 17:10:04 MSK 2020


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



More information about the Tarantool-patches mailing list