From 87638f2ab5379c04dfdf87329ebe450c24ac25bc Mon Sep 17 00:00:00 2001 From: Sri Vignesh Date: Mon, 24 Feb 2020 13:46:27 +0530 Subject: [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 --- ...t_setting_volume_option_with_more_than_4096_characters.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/functional/glusterd/test_setting_volume_option_with_more_than_4096_characters.py') 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)) -- cgit