mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
Merge pull request #17856 from ClickHouse/fix_test_log_s3
Kill network container with retries in integration tests
This commit is contained in:
commit
5f35279c09
@ -173,11 +173,16 @@ class _NetworkManager:
|
|||||||
def _ensure_container(self):
|
def _ensure_container(self):
|
||||||
if self._container is None or self._container_expire_time <= time.time():
|
if self._container is None or self._container_expire_time <= time.time():
|
||||||
|
|
||||||
if self._container is not None:
|
for i in range(5):
|
||||||
try:
|
if self._container is not None:
|
||||||
self._container.remove(force=True)
|
try:
|
||||||
except docker.errors.NotFound:
|
self._container.remove(force=True)
|
||||||
pass
|
break
|
||||||
|
except docker.errors.NotFound:
|
||||||
|
break
|
||||||
|
except Exception as ex:
|
||||||
|
print("Error removing network blocade container, will try again", str(ex))
|
||||||
|
time.sleep(i)
|
||||||
|
|
||||||
image = subprocess.check_output("docker images -q yandex/clickhouse-integration-helper 2>/dev/null", shell=True)
|
image = subprocess.check_output("docker images -q yandex/clickhouse-integration-helper 2>/dev/null", shell=True)
|
||||||
if not image.strip():
|
if not image.strip():
|
||||||
|
Loading…
Reference in New Issue
Block a user