From 094145a69b814f7934db85dc9c5853f30a302d8d Mon Sep 17 00:00:00 2001 From: awen <444014092@qq.com> Date: Mon, 8 Jun 2026 10:25:46 +0800 Subject: [PATCH] Fix ISO tagging tests: wait for ISO download before tagging operations The create_iso() helper in test_tags.py calls Iso.create() and immediately returns, but the ISO may still be downloading when tagging tests proceed. This causes tests 7, 16, and 17 to fail intermittently with upload errors. Call iso.download() after creation, which has a built-in retry loop that waits for the ISO to reach 'Successfully Installed' and isready state. If the download fails after the retry period, skip the test instead of failing with an opaque upload error. Fixes intermittent failures in test_07_iso_tag, test_16_query_tags_other_account, and test_17_query_tags_admin_account. --- test/integration/component/test_tags.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/integration/component/test_tags.py b/test/integration/component/test_tags.py index 6ee5d3c6ea92..c8a077a032d6 100644 --- a/test/integration/component/test_tags.py +++ b/test/integration/component/test_tags.py @@ -3049,10 +3049,11 @@ def create_iso(self): self.cleanup.append(iso) self.debug("ISO created with ID: %s" % iso.id) - list_iso_response = Iso.list(self.apiclient, - id=iso.id) - - if not isinstance(list_iso_response, list): - raise unittest.SkipTest("Registered ISO can not be found/listed for tagging") + try: + iso.download(self.apiclient) + except Exception as e: + raise unittest.SkipTest( + "ISO download failed: %s" % e + ) return iso