Copilot commented on code in PR #13072: URL: https://github.com/apache/gravitino/pull/13072#discussion_r3978846726
########## clients/client-python/tests/integration/containers/hdfs_container.py: ########## @@ -15,58 +15,57 @@ # specific language governing permissions and limitations # under the License. -import asyncio import logging import os import time from docker.errors import DockerException from gravitino.exceptions.base import GravitinoRuntimeException -from gravitino.exceptions.base import InternalError from tests.integration.containers.base_container import BaseContainer logger = logging.getLogger(__name__) -async def check_hdfs_status(hdfs_container): - retry_limit = 15 - for _ in range(retry_limit): +def check_hdfs_container_status(hdfs_container, timeout_sec=150, interval_sec=10): + """Wait for HDFS and the remote Hive Metastore, with bounded probe commands.""" + deadline = time.monotonic() + timeout_sec Review Comment: Consider adding type hints to `check_hdfs_container_status` (and its parameters) to match the typing style used in other container helpers (e.g., `OAuth2Container.health_check()` and `check_oauth2_container_status(...)`). This makes the new timeout/interval parameters clearer and helps static analysis. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
