Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
yngvar-antonsson committed Feb 10, 2025
1 parent 50ab561 commit 755f3be
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/integration/expel_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,22 @@ g.before_all(function()
g.A1:call('package.loaded.cartridge.admin_edit_topology',
{{servers = {{uuid = expelled.instance_uuid, expelled = true}}}})

g.standalone = helpers.Server:new({
alias = 'standalone',
workdir = fio.pathjoin(g.cluster.datadir, 'standalone'),
command = helpers.entrypoint('srv_basic'),
cluster_cookie = g.cluster.cookie,
advertise_port = 13300,
http_port = 8080,
replicaset_uuid = helpers.uuid('b'),
instance_uuid = helpers.uuid('b', 'b', 1),
})
g.standalone:start()
end)

g.after_all(function()
g.cluster:stop()
g.standalone:stop()
fio.rmtree(g.cluster.datadir)
end)

Expand Down Expand Up @@ -115,6 +127,7 @@ function g.test_api()
[g.cluster:server('A-1').advertise_uri] = true,
[g.cluster:server('A-2').advertise_uri] = true,
[g.cluster:server('A-3').advertise_uri] = true,
[g.standalone.advertise_uri] = true,
}
table.sort(expected)

Expand All @@ -123,7 +136,12 @@ function g.test_api()
g.A1.env['TARANTOOL_EXCLUDE_EXPELLED_MEMBERS'] = 'true'
g.A1:restart()

expected[g.expelled_uri] = nil
g.A1:exec(function(uri)
local membership = require('membership')
membership.remove_member(uri)
end, {g.expelled_uri})


expected[g.expelled_uri] = nil
check_members(g, expected)
end

0 comments on commit 755f3be

Please sign in to comment.