Skip to content

Commit

Permalink
test: fix flaky test case test_csi_volumesnapshot_restore_pre_provisi…
Browse files Browse the repository at this point in the history
…on_backing_image

Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu committed Feb 29, 2024
1 parent 4a3ac3c commit 7b77cb9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions manager/integration/tests/test_csi_snapshotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

0 comments on commit 7b77cb9

Please sign in to comment.