1
1

tests: restore retry behaviour for docker-machine ip command

Этот коммит содержится в:
Marc Hoersken 2020-06-20 18:44:30 +02:00
родитель 0f6d3b68db
Коммит b78e57a2d7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 61E03CBED7BC859E

Просмотреть файл

@ -167,9 +167,11 @@ static int ip_address_from_container(char *container_id, char **ip_address_out)
int attempt_no = 0;
int wait_time = 500;
for(;;) {
return run_command(ip_address_out, "docker-machine ip %s", active_docker_machine);
if(attempt_no > 5) {
int ret = run_command(ip_address_out, "docker-machine ip %s", active_docker_machine);
if(ret == 0) {
return 0;
}
else if(attempt_no > 5) {
fprintf(
stderr,
"Unable to get IP from docker-machine after %d attempts\n",