[Tarantool-patches] [PATCH v1] test: fix replication/replica_rejoin.test.lua

Alexander V. Tikhonov avtikhon at tarantool.org
Tue Oct 13 15:54:49 MSK 2020


Mistakenly the patch from 2.x Tarantool releases was used for 1.10:

  61e5229617d4a840b9ae8bd2454dcef8fc1c754b "test: flaky replication/replica_rejoin.test.lua"

While the test had to be adapted especialy for 1.10. This commit
fixes the issue produced by that patch and completely adapts the
needed changes. The difference between 1.10 release and 2.x is
the different replication status need to be checked:

  2.x: "loading" + message
  1.10: "stopped" + box.info.status == "orphan"
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/flaky-checksums_1.10_fix

 test/replication/replica_rejoin.result   | 6 +++++-
 test/replication/replica_rejoin.test.lua | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/replication/replica_rejoin.result b/test/replication/replica_rejoin.result
index f6e41edc3..18a698d28 100644
--- a/test/replication/replica_rejoin.result
+++ b/test/replication/replica_rejoin.result
@@ -224,7 +224,11 @@ test_run:cmd("switch replica")
 ---
 - true
 ...
-test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
+test_run:wait_upstream(1, {status = 'stopped'})
+---
+- true
+...
+test_run:wait_cond(function() return box.info.status == 'orphan' end)
 ---
 - true
 ...
diff --git a/test/replication/replica_rejoin.test.lua b/test/replication/replica_rejoin.test.lua
index 0aeaba6c0..f2c2f0b44 100644
--- a/test/replication/replica_rejoin.test.lua
+++ b/test/replication/replica_rejoin.test.lua
@@ -82,7 +82,8 @@ 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'")
 test_run:cmd("switch replica")
-test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
+test_run:wait_upstream(1, {status = 'stopped'})
+test_run:wait_cond(function() return box.info.status == 'orphan' end)
 box.space.test:select()
 
 --
-- 
2.25.1



More information about the Tarantool-patches mailing list