Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 1e82d5f

Browse files
committed
testing: init shard module once per tarantool run
The change is about code readability only, because we don't run `app = tarantool` default server from existing snapshots. No functional changes made.
1 parent 5735b62 commit 1e82d5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/shard_servers/master.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env tarantool
22

3+
local shard_initialized = false
4+
35
box.cfg({
46
listen = os.getenv('LISTEN'),
57
})
@@ -15,9 +17,10 @@ function init_shard(servers, config, suite)
1517
local test_run = env.new()
1618

1719
test_run:create_cluster(servers, suite)
18-
box.once('init_shard_module', function()
20+
if not shard_initialized then
1921
shard.init(config)
20-
end)
22+
shard_initialized = true
23+
end
2124
shard.wait_connection()
2225
end
2326

0 commit comments

Comments
 (0)