Skip to content

Commit

Permalink
test: ignore zero lsn when waiting for vclock in router2 test
Browse files Browse the repository at this point in the history
In test `router/router2` we get vclock from one instance and wait for
this vclock on another one. The problem is we get vclock with local lsn
which is independent on each instance - the commit fixes this mistake.

NO_DOC=test
  • Loading branch information
drewdzzz committed Jul 31, 2024
1 parent 2211be2 commit 60b521f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions test/router/router2.result
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ echo_count = 0
box.cfg{replication = old_replication}
| ---
| ...
test_run:wait_vclock('storage_2_b', test_run:get_vclock('storage_1_a'))
test_run:wait_vclock('storage_2_b', \
test_run:get_vclock('storage_1_a', {ignore_zero = true}))
| ---
| ...

Expand Down Expand Up @@ -425,7 +426,8 @@ assert(echo_count == 0)
box.schema.user.grant('storage', 'execute', 'function', 'vshard.storage.call')
| ---
| ...
test_run:wait_vclock('storage_2_b', test_run:get_vclock('storage_1_a'))
test_run:wait_vclock('storage_2_b', \
test_run:get_vclock('storage_1_a', {ignore_zero = true}))
| ---
| ...

Expand Down
6 changes: 4 additions & 2 deletions test/router/router2.test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ assert(echo_count == 1)
echo_count = 0
-- Restore the replication so the replica gets the _func change from master.
box.cfg{replication = old_replication}
test_run:wait_vclock('storage_2_b', test_run:get_vclock('storage_1_a'))
test_run:wait_vclock('storage_2_b', \
test_run:get_vclock('storage_1_a', {ignore_zero = true}))

test_run:switch('router_1')
ok, err = vshard.router.callro(1, 'echo', {100}, long_timeout)
Expand All @@ -167,7 +168,8 @@ assert(err.error.code == box.error.ACCESS_DENIED)
test_run:switch('storage_2_a')
assert(echo_count == 0)
box.schema.user.grant('storage', 'execute', 'function', 'vshard.storage.call')
test_run:wait_vclock('storage_2_b', test_run:get_vclock('storage_1_a'))
test_run:wait_vclock('storage_2_b', \
test_run:get_vclock('storage_1_a', {ignore_zero = true}))

--
-- No vshard function = backoff.
Expand Down

0 comments on commit 60b521f

Please sign in to comment.