Skip to content
Snippets Groups Projects
Unverified Commit efc95ee4 authored by Sergey Ostanevich's avatar Sergey Ostanevich Committed by Yaroslav Lobankov
Browse files

test: replication/transaction flakiness fix

The test is expected the replication is broken by the time of the
server switch. Apparently, switch won the race, so the expectation
is changed for waiting.

Closes https://github.com/tarantool/tarantool-qa/issues/271

NO_CHANGELOG=testing
NO_DOC=testing
NO_TEST=testing

(cherry picked from commit 0e181b35)
parent a0de2404
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,11 @@ test_run:cmd("switch replica")
---
- true
...
-- check replication status
test_run:wait_upstream(1,{status = 'stopped', message_re = 'Duplicate key'})
---
- true
...
-- nothing was applied
v1[1] == box.info.vclock[1]
---
......@@ -73,16 +78,6 @@ box.space.test:select()
- [2, 'm']
- [4, 'r']
...
-- check replication status
box.info.replication[1].upstream.status
---
- stopped
...
box.info.replication[1].upstream.message
---
- Duplicate key exists in unique index "pk" in space "test" with old tuple - [4, "r"]
and new tuple - [4, "m"]
...
-- set conflict to third transaction
_ = box.space.test:delete({4})
---
......
......@@ -26,12 +26,11 @@ box.begin() s:insert({3, 'm'}) s:insert({4, 'm'}) box.commit()
box.begin() s:insert({5, 'm'}) s:insert({6, 'm'}) s:insert({7, 'm'}) box.commit()
test_run:cmd("switch replica")
-- check replication status
test_run:wait_upstream(1,{status = 'stopped', message_re = 'Duplicate key'})
-- nothing was applied
v1[1] == box.info.vclock[1]
box.space.test:select()
-- check replication status
box.info.replication[1].upstream.status
box.info.replication[1].upstream.message
-- set conflict to third transaction
_ = box.space.test:delete({4})
box.space.test:replace({6, 'r'})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment