tarantool / tt

Command-line utility to manage Tarantool applications
Other
101 stars 12 forks source link

tests: fix flaky tests in test_running_cluster.py #1002

Closed elhimov closed 1 week ago

elhimov commented 2 weeks ago

The problem occurs when trying to stop cluster (either with tt stop or with tt restart) at the moment bootstrap have not been completed. In such a scenario once the replica instance is stopped with either of the mentioned commands the corresponding master instance exits instantly with the critical failure as below:

F> can't initialize storage: Can't check who replica <...> at <...> chose its bootstrap leader

As a result tt stop/restart for the master instance doesn't produce the termination-message:

The Instance small_cluster_app:storage-master (PID = <...>) has been terminated

because such kind of message is produced only for a running instance.

This commit introduces waiting for the cluster bootstrap completion after it is started or restarted.

Closes #1000