[Tarantool-patches] [PATCH 3/3] test: replication/status -- fetch downstream lag field

Cyrill Gorcunov gorcunov at gmail.com
Thu Jan 21 20:17:52 MSK 2021


Extend the test to observe downstream.lag value.

Part-of #5447

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 test/replication/status.result   | 8 ++++++++
 test/replication/status.test.lua | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/test/replication/status.result b/test/replication/status.result
index a8c515dbb..e59694730 100644
--- a/test/replication/status.result
+++ b/test/replication/status.result
@@ -186,6 +186,14 @@ test_run:wait_cond(function()                    \
 ---
 - true
 ...
+-- once replication vclock is reached there
+-- should be non infinity downstream lag, set
+-- it to some sane value but not short since
+-- there might be network lags on a low level
+replica.downstream.lag ~= nil and replica.downstream.lag < 60
+---
+- true
+...
 --
 -- Replica
 --
diff --git a/test/replication/status.test.lua b/test/replication/status.test.lua
index 431463d8a..0525694bb 100644
--- a/test/replication/status.test.lua
+++ b/test/replication/status.test.lua
@@ -73,6 +73,12 @@ test_run:wait_cond(function()                    \
             r[replica_id] == box.info.vclock[replica_id]) \
     end) or require('log').error(box.info)
 
+-- once replication vclock is reached there
+-- should be non infinity downstream lag, set
+-- it to some sane value but not short since
+-- there might be network lags on a low level
+replica.downstream.lag ~= nil and replica.downstream.lag < 60
+
 --
 -- Replica
 --
-- 
2.29.2



More information about the Tarantool-patches mailing list