Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove deprecated option from utils #219

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fast_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
tarantool:
- '1.10'
- '2.8'
- '2.9'
- '2.10'

steps:
- name: Clone the module
Expand Down
28 changes: 19 additions & 9 deletions t/tnt/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@ local function tnt_cluster_prepare(cfg_args)
cfg_args[snapdir_optname()] = dir
cfg_args[logger_optname()] = fio.pathjoin(dir, 'tarantool.log')
cfg_args['listen'] = bind_master
cfg_args['replication'] = {'replicator:password@' .. bind_replica,
'replicator:password@' .. bind_master}
cfg_args['replication'] = {'replicator:password@' .. bind_master}
if vinyl_name() then
local vinyl_optname = vinyl_name() .. '_dir'
cfg_args[vinyl_optname] = dir
end
cfg_args['replication_connect_quorum'] = 1
cfg_args['replication_connect_timeout'] = 0.01

box.cfg(cfg_args)
-- Allow guest all operations.
Expand Down Expand Up @@ -123,14 +120,27 @@ local function tnt_cluster_prepare(cfg_args)
stderr = 'devnull',
})

-- Wait for replica to connect.
local id = (box.info.replication[1].uuid ~= box.info.uuid and 1) or 2
local attempts = 0

while true do
if #box.info.replication == 2 and box.info.replication[id].upstream then
break
-- Wait for replica to connect.
while box.info.replication[2] == nil or box.info.replication[2].downstream.status ~= 'follow' do
attempts = attempts + 1
if attempts == 30 then
error('wait for replica connection')
end
fiber.sleep(0.1)
end

box.cfg({replication =
{'replicator:password@' .. bind_replica,
'replicator:password@' .. bind_master
}
})

-- Wait for connect to replica.
attempts = 0

while box.info.replication[2].upstream.status ~= 'follow' do
attempts = attempts + 1
if attempts == 30 then
error('wait for replica failed')
Expand Down
Loading