Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions python/tests/platform/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,19 @@ def wait_for_deployment_status(
- If 'desired' is a function, until it returns true when passed
the deployment status.
"""
deadline = time.time() + timeout_s
start = time.time()
deadline = start + timeout_s
last = None
while time.time() < deadline:
r = get_pipeline(name, "status")
if r.status_code != HTTPStatus.OK:
time.sleep(0.25)
continue
obj = r.json()
last = obj.get("deployment_status")
status = obj.get("deployment_status")
if status != last:
print(f"After {time.time() - start:.1f} seconds: status is {status}")
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using print() for debugging in tests is not ideal. Consider using a proper logging framework (e.g., Python's logging module) which can be configured to different levels and outputs. This would allow better control over when these messages appear and make them easier to filter or disable in production test runs.

Copilot uses AI. Check for mistakes.
last = status
if last == desired if isinstance(desired, str) else desired(last):
return obj
time.sleep(0.25)
Expand Down
Loading