diff --git a/manager/integration/tests/test_rwx.py b/manager/integration/tests/test_rwx.py index d01f840449..2a8aad5706 100644 --- a/manager/integration/tests/test_rwx.py +++ b/manager/integration/tests/test_rwx.py @@ -12,9 +12,9 @@ from common import wait_for_volume_creation, DATA_SIZE_IN_MB_3 from common import create_pv_for_volume, create_pvc_for_volume from common import DEFAULT_STATEFULSET_TIMEOUT, DEFAULT_STATEFULSET_INTERVAL +from common import wait_delete_pod, wait_for_pod_remount from common import get_core_api_client, write_pod_volume_random_data from common import create_pvc_spec, make_deployment_with_pvc # NOQA -from common import wait_for_pod_phase from common import core_api, statefulset, pvc, pod, client # NOQA from common import RETRY_COUNTS, RETRY_INTERVAL from common import EXPANDED_VOLUME_SIZE @@ -344,9 +344,10 @@ def test_rwx_delete_share_manager_pod(core_api, statefulset): # NOQA 2. Wait for StatefulSet to come up healthy. 3. Write data and compute md5sum. 4. Delete the share manager pod. - 5. Check the data md5sum in statefulSet. - 6. Write more data to it and compute md5sum. - 7. Check the data md5sum in share manager volume. + 5. Wait for a new pod to be created and volume getting attached. + 6. Check the data md5sum in statefulSet. + 7. Write more data to it and compute md5sum. + 8. Check the data md5sum in share manager volume. """ statefulset_name = 'statefulset-delete-share-manager-pods-test' @@ -377,8 +378,10 @@ def test_rwx_delete_share_manager_pod(core_api, statefulset): # NOQA delete_and_wait_pod(core_api, share_manager_name, namespace=LONGHORN_NAMESPACE) - wait_for_pod_phase(core_api, share_manager_name, - namespace=LONGHORN_NAMESPACE, pod_phase="Running") + target_pod = core_api.read_namespaced_pod(name=pod_name, + namespace='default') + wait_delete_pod(core_api, target_pod.metadata.uid) + wait_for_pod_remount(core_api, pod_name) test_data_2 = generate_random_data(VOLUME_RWTEST_SIZE) write_pod_volume_data(core_api, pod_name, test_data_2, filename='test2')