Skip to content

Commit

Permalink
test: need to wait for upstream/downstream status
Browse files Browse the repository at this point in the history
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
  • Loading branch information
avtikhon committed May 7, 2019
1 parent 22db9c2 commit c9b4156
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions test/replication/show_error_on_disconnect.result
Expand Up @@ -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")
---
Expand All @@ -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")
---
Expand Down
6 changes: 3 additions & 3 deletions test/replication/show_error_on_disconnect.test.lua
Expand Up @@ -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.
Expand Down

0 comments on commit c9b4156

Please sign in to comment.