diff --git a/tests/conftest.py b/tests/conftest.py index a49f0e89297..d15bbaf2091 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1092,6 +1092,7 @@ def factory( status=constants.STATUS_BOUND, volume_mode=None, size_unit="Gi", + wait_for_resource_status_timeout=60, ): """ Args: @@ -1114,6 +1115,8 @@ def factory( volume_mode (str): Volume mode for PVC. eg: volume_mode='Block' to create rbd `block` type volume size_unit (str): PVC size unit, eg: "Mi" + wait_for_resource_status_timeout (int): Wait in seconds until the + desired PVC status is reached. Returns: object: helpers.create_pvc instance. @@ -1152,7 +1155,9 @@ def factory( assert pvc_obj, "Failed to create PVC" if status: - helpers.wait_for_resource_state(pvc_obj, status) + helpers.wait_for_resource_state( + pvc_obj, status, timeout=wait_for_resource_status_timeout + ) pvc_obj.storageclass = storageclass pvc_obj.project = project pvc_obj.access_mode = access_mode diff --git a/tests/functional/pv/pv_encryption/test_encrypted_pvc_no_expansion_option.py b/tests/functional/pv/pv_encryption/test_encrypted_pvc_no_expansion_option.py index 20b4ba07055..d3ce1a95ac4 100644 --- a/tests/functional/pv/pv_encryption/test_encrypted_pvc_no_expansion_option.py +++ b/tests/functional/pv/pv_encryption/test_encrypted_pvc_no_expansion_option.py @@ -127,6 +127,7 @@ def test_encrypted_pvc_no_expansion_option( storageclass=sc_obj, size=pvc_size, status=constants.STATUS_BOUND, + wait_for_resource_status_timeout=120, ) pod_obj = pod_factory(pvc=pvc_obj)