path: root/tests/functional/glusterd/
diff options
authorsrijan-sivakumar <>2020-11-25 10:51:23 +0530
committerArthy Loganathan <>2020-12-04 08:18:48 +0000
commit13534394ea9417a3189bd4ccab1bd474804ca353 (patch)
tree8114cca1173a496403241f70ec2dbc9a85d1d484 /tests/functional/glusterd/
parent69e3848379080b366ae9861a8c13e7f799933393 (diff)
[TestFix] Performing cluster options reset.
Issue: The cluster options set during TC aren't reset, causing the cluster options to affect subsequent TC runs. Fix: Adding volume_reset() in the tearDown of a TC to perform a cleanup of the cluster options. Change-Id: I00da5837d2a4260b4d414cc3c8083f83d8f6fadd Signed-off-by: srijan-sivakumar <>
Diffstat (limited to 'tests/functional/glusterd/')
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/functional/glusterd/ b/tests/functional/glusterd/
index 71a47064f..d444f0fb2 100644
--- a/tests/functional/glusterd/
+++ b/tests/functional/glusterd/
@@ -22,7 +22,9 @@ Description:
from glusto.core import Glusto as g
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
-from glustolibs.gluster.volume_ops import get_volume_options
+from glustolibs.gluster.volume_ops import (
+ get_volume_options,
+ volume_reset)
from glustolibs.gluster.gluster_init import (
@@ -30,6 +32,7 @@ from glustolibs.gluster.gluster_init import (
from glustolibs.gluster.brick_libs import get_all_bricks
from glustolibs.gluster.brickmux_ops import get_brick_processes_count
+from glustolibs.gluster.peer_ops import wait_for_peers_to_connect
@runs_on([['replicated', 'arbiter', 'dispersed', 'distributed',
@@ -119,11 +122,22 @@ class TestGlusterDDefaultVolumeBehaviorQuorumOptions(GlusterBaseClass):
def tearDown(self):
"""tear Down Callback"""
+ # Wait for peers to connect.
+ ret = wait_for_peers_to_connect(self.mnode, self.servers, 50)
+ if not ret:
+ raise ExecutionError("Peers are not in connected state.")
# Unmount volume and cleanup.
ret = self.cleanup_volume()
if not ret:
raise ExecutionError("Failed to Unmount and Cleanup volume")"Successful in unmount and cleanup operations")
+ # Reset the cluster options.
+ ret = volume_reset(self.mnode, "all")
+ if not ret:
+ raise ExecutionError("Failed to Reset the cluster options.")
+"Successfully reset cluster options.")
# Calling GlusterBaseClass tearDown
self.get_super_method(self, 'tearDown')()