From 7b77cb972cdd71bf2a0e8b8b6f3a6b625231ce99 Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Thu, 29 Feb 2024 15:50:21 +0800 Subject: [PATCH] test: fix flaky test case test_csi_volumesnapshot_restore_pre_provision_backing_image Signed-off-by: Yang Chiu --- manager/integration/tests/test_csi_snapshotter.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/manager/integration/tests/test_csi_snapshotter.py b/manager/integration/tests/test_csi_snapshotter.py index 05493e5ce9..a6cc4f33bd 100644 --- a/manager/integration/tests/test_csi_snapshotter.py +++ b/manager/integration/tests/test_csi_snapshotter.py @@ -29,7 +29,6 @@ from common import make_deployment_with_pvc, apps_api # NOQA from common import check_pvc_in_specific_status # NOQA from common import wait_for_pvc_phase -from common import RETRY_COMMAND_COUNT from common import BACKING_IMAGE_QCOW2_URL, BACKING_IMAGE_QCOW2_CHECKSUM from common import BACKING_IMAGE_RAW_URL, BACKING_IMAGE_RAW_CHECKSUM from common import BACKING_IMAGE_SOURCE_TYPE_DOWNLOAD, RETRY_COUNTS_SHORT @@ -280,7 +279,7 @@ def get_volumesnapshotcontent(volumesnapshot_uid): def wait_volumesnapshot_deleted(name, namespace, - retry_counts=RETRY_COMMAND_COUNT, + retry_counts=RETRY_COUNTS, can_be_deleted=True): api = get_custom_object_api_client() api_group = "snapshot.storage.k8s.io" @@ -1349,8 +1348,7 @@ def finalizer(): delete_and_wait_pvc(core_api, restore_pvc_name) delete_volumesnapshot(csivolsnap_name, "default") wait_volumesnapshot_deleted(csivolsnap_name, - "default", - retry_counts=RETRY_COUNTS_SHORT) + "default") request.addfinalizer(finalizer) @@ -1661,7 +1659,6 @@ def finalizer(): delete_and_wait_pvc(core_api, pvc['metadata']['name']) delete_volumesnapshot(csivolsnap_name, "default") wait_volumesnapshot_deleted(csivolsnap_name, - "default", - retry_counts=RETRY_COUNTS_SHORT) + "default") request.addfinalizer(finalizer)