Skip to content

Commit e1cf6a4

Browse files
committed
test: fix flaky test_restart_simple_app_auto_yes
The patch add proper check that tarantool is started. Also logging was improved to get more information in case of failure. Closes TNTP-7654
1 parent aae1dd3 commit e1cf6a4

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

test/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ def tt_app(tt, tt_path, tt_instances, tt_running_targets, tt_post_start):
273273
p = tt.run("start", target)
274274
assert p.returncode == 0
275275
app.running_instances = app.instances_of(*tt_running_targets)
276+
assert tt_helper.wait_box_status(5, app, app.running_instances, ["running"])
276277
if tt_post_start is not None:
277278
tt_post_start(app)
278279
yield app

test/integration/restart/test_restart.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ def check_restart(tt, tt_app, target, input, is_confirm, *args):
109109
for inst in tt_app.instances:
110110
was_running = inst in tt_app.running_instances
111111
if is_confirm and inst in target_instances:
112+
if status[inst]["STATUS"] != "RUNNING":
113+
with open(tt_app.log_path(inst, utils.log_file)) as f:
114+
print(f"log of instance {inst} ======")
115+
print(f.read())
116+
print("=============================")
117+
assert False
112118
assert status[inst]["STATUS"] == "RUNNING"
113119
assert f"Starting an instance [{inst}]" in out
114120
if was_running:

0 commit comments

Comments
 (0)