提交 f7bb7551 编写于 作者: A alesapin 提交者: Vitaly Baranov

Merge pull request #17856 from ClickHouse/fix_test_log_s3

Kill network container with retries in integration tests

(cherry picked from commit 5f35279c)
上级 4e1f85b0
......@@ -173,11 +173,16 @@ class _NetworkManager:
def _ensure_container(self):
if self._container is None or self._container_expire_time <= time.time():
if self._container is not None:
try:
self._container.remove(force=True)
except docker.errors.NotFound:
pass
for i in range(5):
if self._container is not None:
try:
self._container.remove(force=True)
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)
if not image.strip():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册