summaryrefslogtreecommitdiffstats
path: root/tests/functional/gluster_stability
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-10-16 20:20:07 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-10-18 19:30:52 +0530
commitee8a02605273c51a4a8337a5fba3ce0a7f449a85 (patch)
treee0300b7fb1399f1e158da2d35856e0b7b86e72d8 /tests/functional/gluster_stability
parent70ded8d3fbfe0b9962d7b4d83edee25044c5ab9b (diff)
Fix 'test_tcmu_runner_failure_while_creating_and_deleting_pvc' tc
'test_tcmu_runner_failure_while_creating_and_deleting_pvc ' tc may fail occasionally when one of the following situations happen: - PVs get deleted very fast, so tc may fail to get their statuses. - PVs may not be updated in time due to the 'slowness' of a cluster. So, to avoid problems related to the above mentioned situations, just check all the deleted and created PVCs, not filtering them. Change-Id: Ib24c5fd7c3310daa0e5523f2c6c1fd90bd958e60
Diffstat (limited to 'tests/functional/gluster_stability')
-rw-r--r--tests/functional/gluster_stability/test_gluster_block_stability.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/tests/functional/gluster_stability/test_gluster_block_stability.py b/tests/functional/gluster_stability/test_gluster_block_stability.py
index 13b8cc85..cd2ece48 100644
--- a/tests/functional/gluster_stability/test_gluster_block_stability.py
+++ b/tests/functional/gluster_stability/test_gluster_block_stability.py
@@ -35,7 +35,6 @@ from openshiftstoragelibs.openshift_ops import (
get_ocp_gluster_pod_details,
get_pod_name_from_dc,
get_pv_name_from_pvc,
- get_pvc_status,
kill_service_on_gluster_pod_or_node,
match_pv_and_heketi_block_volumes,
oc_adm_manage_node,
@@ -969,23 +968,6 @@ class TestGlusterBlockStability(GlusterBlockBaseClass):
self.node, "systemctl restart %s" % " ".join(services),
gluster_node=self.gluster_servers[0])
- # Get the names of PV's which are in Released state after PVC deletion
- pending_creations, pending_deletions = [], []
- for pv_name in pv_names_for_deletions:
- # Check "Released" status for PV and add it to the list
- try:
- pv_status = oc_get_custom_resource(
- self.node, "pv", ":.status.phase", pv_name)[0]
- if pv_status == 'Released':
- pending_deletions.append(pv_name)
- except AssertionError:
- pass
-
- # Check which PVC's are in pending state and add to pending list
- for pvc_name_in_creations in pvc_names_for_creations:
- if get_pvc_status(self.node, pvc_name_in_creations) == 'Pending':
- pending_creations.append(pvc_name_in_creations)
-
# Restart the services
for service in services:
state = (
@@ -996,8 +978,8 @@ class TestGlusterBlockStability(GlusterBlockBaseClass):
self.node, service, 'active', state, self.gluster_servers[0])
# Wait for PV's absence and PVC's getting bound
- wait_for_resources_absence(self.node, 'pv', pending_deletions)
- wait_for_pvcs_be_bound(self.node, pending_creations, timeout=300)
+ wait_for_resources_absence(self.node, 'pv', pv_names_for_deletions)
+ wait_for_pvcs_be_bound(self.node, pvc_names_for_creations, timeout=300)
# Validate volumes in heketi blockvolume list
heketi_volumes = heketi_blockvolume_list(