summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-02-24 13:46:27 +0530
committerSri Vignesh <sselvan@redhat.com>2020-02-25 09:27:02 +0000
commit87638f2ab5379c04dfdf87329ebe450c24ac25bc (patch)
tree4456f11d1dfba028bdee646d53490e4938afbf06 /tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py
parent16a3b1f8dd1492fe45861cbd9f3a7d10f988c843 (diff)
[testfix] Add steps to stabilise glusterd
Moved steps from teardown class to teardown and removed unwanted teardown class and rectified the testcase failing with wait for io to complete by removing the step because after validate io the sub process terminates and results in failure. Change-Id: I2eaf05680b817b681aff8b48683fc9dac88896b0 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py')
-rw-r--r--tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py b/tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py
index 2c8479542..64b968bb4 100644
--- a/tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py
+++ b/tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py
@@ -21,7 +21,9 @@ from glustolibs.gluster.peer_ops import wait_for_peers_to_connect
from glustolibs.gluster.volume_libs import setup_volume
from glustolibs.gluster.volume_ops import set_volume_options
from glustolibs.gluster.gluster_init import (restart_glusterd,
- wait_for_glusterd_to_start)
+ wait_for_glusterd_to_start,
+ is_glusterd_running,
+ start_glusterd)
@runs_on([['distributed'], ['glusterfs']])
@@ -37,6 +39,14 @@ class TestVolumeOptionSetWithMaxcharacters(GlusterBaseClass):
def tearDown(self):
+ ret = is_glusterd_running(self.servers)
+ if ret:
+ ret = start_glusterd(self.servers)
+ if not ret:
+ raise ExecutionError("Failed to start glusterd on %s"
+ % self.servers)
+ g.log.info("Glusterd started successfully on %s", self.servers)
+
ret = wait_for_peers_to_connect(self.mnode, self.servers)
self.assertTrue(ret, "glusterd is not connected %s with peer %s"
% (self.servers, self.servers))