File: bootstrap_leader.test.lua

package info (click to toggle)
tarantool 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 85,364 kB
  • sloc: ansic: 513,760; cpp: 69,489; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,173; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (27 lines) | stat: -rw-r--r-- 841 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
test_run = require('test_run').new()

create_server_cmd = "create server replica%d with script='replication/replica_uuid_rw%d.lua'"

test_run:cmd("setopt delimiter ';'")

for i = 1,3 do
    test_run:cmd(string.format(create_server_cmd, i, i))
end;

test_run:cmd("start server replica1 with wait_load=True, wait=True");
test_run:cmd("start server replica2 with args='1,2,3 1.0 100500 0.1', wait_load=False, wait=False");
test_run:cmd("start server replica3 with args='1,2,3 0.1 0.5 100500', wait_load=True, wait=True");

test_run:cmd("switch replica3");
fiber = require('fiber');
while (#box.info.replication < 3) do
    fiber.sleep(0.05)
end;
test_run:cmd("switch default");

for i = 1,3 do
    test_run:cmd("stop server replica"..i.." with cleanup=1")
    test_run:cmd("delete server replica"..i)
end;

test_run:cmd("setopt delimiter ''");