Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1] test: need to wait for upstream/downstream status
@ 2019-04-16  5:45 avtikhon
  0 siblings, 0 replies; only message in thread
From: avtikhon @ 2019-04-16  5:45 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: avtikhon, tarantool-patches

It is needed to wait for upstream/downstream status, otherwise
error occurs:

    [025] --- replication/show_error_on_disconnect.result Fri Apr 12 14:49:26 2019
    [025] +++ replication/show_error_on_disconnect.reject Tue Apr 16 07:35:41 2019
    [025] @@ -77,11 +77,12 @@
    [025] ...
    [025] box.info.replication[other_id].upstream.status
    [025] ---
    [025] -- stopped
    [025] +- sync
    [025] ...
    [025] box.info.replication[other_id].upstream.message:match("Missing")
    [025] ---
    [025] -- Missing
    [025] +- error: '[string "return box.info.replication[other_id].upstrea..."]:1: attempt to
    [025] + index field ''message'' (a nil value)'
    [025] ...
    [025] test_run:cmd("switch master_quorum2")
    [025] ---
    [025]

Close #4161
---
 test/replication/show_error_on_disconnect.result   | 12 ++++++------
 test/replication/show_error_on_disconnect.test.lua |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/replication/show_error_on_disconnect.result b/test/replication/show_error_on_disconnect.result
index af082203b..ef239af39 100644
--- a/test/replication/show_error_on_disconnect.result
+++ b/test/replication/show_error_on_disconnect.result
@@ -75,9 +75,9 @@ box.space.test:select()
 other_id = box.info.id % 2 + 1
 ---
 ...
-box.info.replication[other_id].upstream.status
+test_run:wait_upstream(box.info.replication[other_id], 'stopped')
 ---
-- stopped
+- true
 ...
 box.info.replication[other_id].upstream.message:match("Missing")
 ---
@@ -96,17 +96,17 @@ box.space.test:select()
 other_id = box.info.id % 2 + 1
 ---
 ...
-box.info.replication[other_id].upstream.status
+test_run:wait_upstream(box.info.replication[other_id], 'follow')
 ---
-- follow
+- true
 ...
 box.info.replication[other_id].upstream.message
 ---
 - null
 ...
-box.info.replication[other_id].downstream.status
+test_run:wait_downstream(box.info.replication[other_id], 'stopped')
 ---
-- stopped
+- true
 ...
 box.info.replication[other_id].downstream.message:match("Missing")
 ---
diff --git a/test/replication/show_error_on_disconnect.test.lua b/test/replication/show_error_on_disconnect.test.lua
index 40e9dbc5e..191c5b090 100644
--- a/test/replication/show_error_on_disconnect.test.lua
+++ b/test/replication/show_error_on_disconnect.test.lua
@@ -30,14 +30,14 @@ box.cfg{replication = repl}
 require('fiber').sleep(0.1)
 box.space.test:select()
 other_id = box.info.id % 2 + 1
-box.info.replication[other_id].upstream.status
+test_run:wait_upstream(box.info.replication[other_id], 'stopped')
 box.info.replication[other_id].upstream.message:match("Missing")
 test_run:cmd("switch master_quorum2")
 box.space.test:select()
 other_id = box.info.id % 2 + 1
-box.info.replication[other_id].upstream.status
+test_run:wait_upstream(box.info.replication[other_id], 'follow')
 box.info.replication[other_id].upstream.message
-box.info.replication[other_id].downstream.status
+test_run:wait_downstream(box.info.replication[other_id], 'stopped')
 box.info.replication[other_id].downstream.message:match("Missing")
 test_run:cmd("switch default")
 -- Cleanup.
-- 
2.17.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-16  5:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16  5:45 [tarantool-patches] [PATCH v1] test: need to wait for upstream/downstream status avtikhon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox