* [tarantool-patches] [PATCH v1] Add the common routine to check streams status
@ 2019-04-16 6:01 avtikhon
0 siblings, 0 replies; only message in thread
From: avtikhon @ 2019-04-16 6:01 UTC (permalink / raw)
To: Alexander Turenko; +Cc: avtikhon, tarantool-patches
Added the common routine that checks the upstream
and downstream status.
Close #158
---
test_run.lua | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/test_run.lua b/test_run.lua
index 42d5e56..01ebcda 100644
--- a/test_run.lua
+++ b/test_run.lua
@@ -227,6 +227,18 @@ local function switch(self, node)
return self:cmd(switch_cmd3:format(node))
end
+local function wait_id(self, id, status)
+ return self:wait_cond(function() return id.status == status end) or id.status
+end
+
+local function wait_downstream(self, id, status)
+ return self:wait_id(id.downstream, status)
+end
+
+local function wait_upstream(self, id, status)
+ return self:wait_id(id.upstream, status)
+end
+
local get_cfg_cmd = 'config %s'
local function get_cfg(self, name)
@@ -360,6 +372,9 @@ local inspector_methods = {
wait_fullmesh = wait_fullmesh,
get_cluster_vclock = get_cluster_vclock,
wait_cluster_vclock = wait_cluster_vclock,
+ wait_id = wait_id,
+ wait_downstream = wait_downstream,
+ wait_upstream = wait_upstream,
--
grep_log = grep_log,
wait_cond = wait_cond,
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-04-16 6:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 6:01 [tarantool-patches] [PATCH v1] Add the common routine to check streams status avtikhon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox