From: avtikhon <avtikhon@tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: avtikhon <avtikhon@tarantool.org>, tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v1] Add the common routine to check streams status
Date: Tue, 16 Apr 2019 09:01:55 +0300 [thread overview]
Message-ID: <5b9d82c550f76a44a43a63b397e05d1e458308e1.1555394501.git.avtikhon@tarantool.org> (raw)
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
reply other threads:[~2019-04-16 6:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b9d82c550f76a44a43a63b397e05d1e458308e1.1555394501.git.avtikhon@tarantool.org \
--to=avtikhon@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v1] Add the common routine to check streams status' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox