Skip to content

Commit 6ecd350

Browse files
committed
made virt_api_pod timeout msg more readable
1 parent 0500585 commit 6ecd350

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tests/observability/metrics/conftest.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -637,14 +637,10 @@ def virt_api_pod(admin_client, hco_namespace):
637637
if sample and len(sample) == 1:
638638
return sample[0]
639639
except TimeoutExpiredError:
640-
LOGGER.error(
641-
f"Should only be 1 virt-api pod running: found {
642-
[
643-
(pod.name, pod.instance.status.phase, pod.instance.metadata.get('deletionTimestamp'))
644-
for pod in sample
645-
]
646-
}"
647-
)
640+
pods_info = [
641+
(pod.name, pod.instance.status.phase, pod.instance.metadata.get("deletionTimestamp")) for pod in sample
642+
]
643+
LOGGER.exception(f"Should only be 1 virt-api pod running: found {pods_info}")
648644
raise
649645

650646

0 commit comments

Comments
 (0)