Consider creating some function like this `lizardfs_wait_for_ready_chunkservers 5` and using it here instead of inlining the code. There is a lot of places in tests where one calls `sleep 1` to wait for such a condition.