diff --git a/tests/storage/test_data_import_cron.py b/tests/storage/test_data_import_cron.py index 9104a26644..be101c4704 100644 --- a/tests/storage/test_data_import_cron.py +++ b/tests/storage/test_data_import_cron.py @@ -206,6 +206,7 @@ def second_object_cleanup( resource_class(namespace=namespace.name, name=second_object_name).clean_up() +@pytest.mark.gating @pytest.mark.polarion("CNV-7602") @pytest.mark.s390x def test_data_import_cron_garbage_collection( diff --git a/utilities/storage.py b/utilities/storage.py index 12905d6723..891cf2145a 100644 --- a/utilities/storage.py +++ b/utilities/storage.py @@ -1013,6 +1013,7 @@ def wait_for_volume_snapshot_ready_to_use(namespace, name): ready_to_use_status = "readyToUse" LOGGER.info(f"Wait for VolumeSnapshot '{name}' in '{namespace}' to be '{ready_to_use_status}'") volume_snapshot = VolumeSnapshot(namespace=namespace, name=name) + volume_snapshot.wait() try: for sample in TimeoutSampler( wait_timeout=TIMEOUT_5MIN, @@ -1020,6 +1021,7 @@ def wait_for_volume_snapshot_ready_to_use(namespace, name): func=lambda: volume_snapshot.instance.get("status", {}).get(ready_to_use_status) is True, ): if sample: + LOGGER.info(f"VolumeSnapshot '{name}' in namespace '{namespace}' reached '{ready_to_use_status}'") return volume_snapshot except TimeoutExpiredError: fail_msg = f"failed to reach {ready_to_use_status} status" if volume_snapshot.exists else "failed to create"