[tarantool-patches] [PATCH] test: fix replica expectance in broken lsn test

Ilya Kosarev i.kosarev at tarantool.org
Tue Sep 17 15:29:11 MSK 2019


xlog/panic_on_broken_lsn includes waiting for replica and then
box.info.vclock usage. Sometimes box.info.vclock was giving wrong
values. Now it is stable due to improved replica expectation
criterion.

Closes #4508
---
Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-4508-fix-broken-lsn-test
Issue: https://github.com/tarantool/tarantool/issues/4508

 test/xlog/panic_on_broken_lsn.result   | 2 +-
 test/xlog/panic_on_broken_lsn.test.lua | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/xlog/panic_on_broken_lsn.result b/test/xlog/panic_on_broken_lsn.result
index 60283281d..1e62680eb 100644
--- a/test/xlog/panic_on_broken_lsn.result
+++ b/test/xlog/panic_on_broken_lsn.result
@@ -139,7 +139,7 @@ test_run:cmd("setopt delimiter ';'")
 - true
 ...
 _ = fiber.create(function()
-    test_run:wait_cond(function() return box.space._cluster:get(2) ~= nil end)
+    test_run:wait_cond(function() return box.info.replication[2] ~= nil end)
     lsn = box.info.vclock[1]
     box.error.injection.set("ERRINJ_RELAY_BREAK_LSN", lsn + 1)
     box.space.test:auto_increment{'v1'}
diff --git a/test/xlog/panic_on_broken_lsn.test.lua b/test/xlog/panic_on_broken_lsn.test.lua
index ca3043458..80cccd918 100644
--- a/test/xlog/panic_on_broken_lsn.test.lua
+++ b/test/xlog/panic_on_broken_lsn.test.lua
@@ -65,7 +65,7 @@ box.error.injection.set("ERRINJ_REPLICA_JOIN_DELAY", true)
 fiber = require('fiber')
 test_run:cmd("setopt delimiter ';'")
 _ = fiber.create(function()
-    test_run:wait_cond(function() return box.space._cluster:get(2) ~= nil end)
+    test_run:wait_cond(function() return box.info.replication[2] ~= nil end)
     lsn = box.info.vclock[1]
     box.error.injection.set("ERRINJ_RELAY_BREAK_LSN", lsn + 1)
     box.space.test:auto_increment{'v1'}
-- 
2.17.1





More information about the Tarantool-patches mailing list