From 20c6a851de86984d36217fbaf6a9230bcc844a0b Mon Sep 17 00:00:00 2001 From: Simon Li Date: Sun, 27 Nov 2022 21:28:43 +0000 Subject: [PATCH] integration-test.py: fix time delay check --- .github/integration-test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/integration-test.py b/.github/integration-test.py index c6aec7f..0dc93e4 100755 --- a/.github/integration-test.py +++ b/.github/integration-test.py @@ -2,7 +2,7 @@ import argparse from shutil import which import subprocess -from time import time +import time import os @@ -42,13 +42,13 @@ def check_container_ready(container_name, timeout=60): """ Check if container is ready to run tests """ - now = time() + now = time.time() while True: try: container_check_output(["exec", "-t", container_name, "id"]) return except subprocess.CalledProcessError: - if time() - now > timeout: + if time.time() - now > timeout: raise RuntimeError(f"Container {container_name} hasn't started") time.sleep(5)