Skip to content

Commit 03177cc

Browse files
0x501DLeonidVas
authored andcommitted
ci: remove deprecated option from utils
Deprecated `replication_connect_quorum` option was removed from replicaset setup method.
1 parent 821f9aa commit 03177cc

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

t/tnt/init.lua

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,11 @@ local function tnt_cluster_prepare(cfg_args)
7676
cfg_args[snapdir_optname()] = dir
7777
cfg_args[logger_optname()] = fio.pathjoin(dir, 'tarantool.log')
7878
cfg_args['listen'] = bind_master
79-
cfg_args['replication'] = {'replicator:password@' .. bind_replica,
80-
'replicator:password@' .. bind_master}
79+
cfg_args['replication'] = {'replicator:password@' .. bind_master}
8180
if vinyl_name() then
8281
local vinyl_optname = vinyl_name() .. '_dir'
8382
cfg_args[vinyl_optname] = dir
8483
end
85-
cfg_args['replication_connect_quorum'] = 1
86-
cfg_args['replication_connect_timeout'] = 0.01
8784

8885
box.cfg(cfg_args)
8986
-- Allow guest all operations.
@@ -123,14 +120,27 @@ local function tnt_cluster_prepare(cfg_args)
123120
stderr = 'devnull',
124121
})
125122

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

130-
while true do
131-
if #box.info.replication == 2 and box.info.replication[id].upstream then
132-
break
125+
-- Wait for replica to connect.
126+
while box.info.replication[2] == nil or box.info.replication[2].downstream.status ~= 'follow' do
127+
attempts = attempts + 1
128+
if attempts == 30 then
129+
error('wait for replica connection')
133130
end
131+
fiber.sleep(0.1)
132+
end
133+
134+
box.cfg({replication =
135+
{'replicator:password@' .. bind_replica,
136+
'replicator:password@' .. bind_master
137+
}
138+
})
139+
140+
-- Wait for connect to replica.
141+
attempts = 0
142+
143+
while box.info.replication[2].upstream.status ~= 'follow' do
134144
attempts = attempts + 1
135145
if attempts == 30 then
136146
error('wait for replica failed')

0 commit comments

Comments
 (0)