Skip to content
Snippets Groups Projects
Commit d9d1deac authored by Alexander V. Tikhonov's avatar Alexander V. Tikhonov Committed by Kirill Yukhin
Browse files

test: flaky replication/replica_rejoin.test.lua

On heavy loaded hosts found the following issue:

  [151] --- replication/replica_rejoin.result     Tue Sep 29 10:57:26 2020
  [151] +++ replication/replica_rejoin.reject     Tue Sep 29 10:57:48 2020
  [151] @@ -230,7 +230,12 @@
  [151]      return box.info ~= nil and box.info.replication[1] ~= nil
  [151]  end)
  [151]  ---
  [151] -- true
  [151] +- error: "builtin/box/load_cfg.lua:601: Please call box.cfg{} first\nstack traceback:\n\tbuiltin/box/load_cfg.lua:601:
  [151] +    in function '__index'\n\t[string \"return test_run:wait_cond(function()         ...\"]:1:
  [151] +    in function 'cond'\n\t/tmp/tnt/151_replication/test_run.lua:411: in function </tmp/tnt/151_replication/test_run.lua:404>\n\t[C]:
  [151] +    in function 'pcall'\n\tbuiltin/box/console.lua:402: in function 'eval'\n\tbuiltin/box/console.lua:708:
  [151] +    in function 'repl'\n\tbuiltin/box/console.lua:842: in function <builtin/box/console.lua:828>\n\t[C]:
  [151] +    in function 'pcall'\n\tbuiltin/socket.lua:1081: in function <builtin/socket.lua:1079>"
  [151]  ...
  [151]  test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
  [151]  ---
  [151]

It happened because box.cfg was not ready to provide information. In
real there is no need to use local check for replication information
parts availablity, due to wait_upstream() function used below, do it
itself.

Part of #4985
parent e7203e38
No related branches found
No related tags found
No related merge requests found
......@@ -224,14 +224,6 @@ test_run:cmd("switch replica")
---
- true
...
-- Need to wait for box.info.replication[1] defined, otherwise test-run fails to
-- wait for the upstream status sometimes.
test_run:wait_cond(function() \
return box.info ~= nil and box.info.replication[1] ~= nil \
end)
---
- true
...
test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
---
- true
......
......@@ -82,11 +82,6 @@ test_run:wait_cond(function() return #fio.glob(fio.pathjoin(box.cfg.wal_dir, '*.
box.cfg{checkpoint_count = checkpoint_count}
test_run:cmd("start server replica with args='true', wait=False")
test_run:cmd("switch replica")
-- Need to wait for box.info.replication[1] defined, otherwise test-run fails to
-- wait for the upstream status sometimes.
test_run:wait_cond(function() \
return box.info ~= nil and box.info.replication[1] ~= nil \
end)
test_run:wait_upstream(1, {message_re = 'Missing %.xlog file', status = 'loading'})
box.space.test:select()
......
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