From 7f7c4a6cb176751331ed924b2933a8073a5363f9 Mon Sep 17 00:00:00 2001 From: Roger Yao Date: Fri, 6 Oct 2023 13:38:39 +0800 Subject: [PATCH] Revert pr-1221 since revert back to `softerr`/`soft` mode in https://github.com/longhorn/longhorn/issues/6655 This reverts commit https://github.com/longhorn/longhorn-tests/pull/1221/commits/14236563ce64077ab374d0fe5d2916fadb25d8c4 Ref: https://github.com/longhorn/longhorn/issues/6838 Signed-off-by: Roger Yao --- manager/integration/tests/test_rwx.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/manager/integration/tests/test_rwx.py b/manager/integration/tests/test_rwx.py index d01f84044..2a8aad570 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')