summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-01-30 11:50:17 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-02-19 12:04:47 +0000
commit7895c20654b06ff647853b7c631953b64026b8c8 (patch)
treeaf10fb9ee734dcb5abf991961ba44fa07791d6a8 /tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
parent75898ee995b08892ab4b936094a58d4321fc24a6 (diff)
[testfix] Add steps to stabilise content in glusterd - part2
and used wait for peer to connect and wait for glusterd to connect functions in testcases added fixes to check file exists increased timeout value for failure cases Change-Id: I9d5692f635ed324ffe7dac9944ec9b8f3b933fd1 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py')
-rw-r--r--tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py b/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
index 4dd2d3d13..1cca5bc88 100644
--- a/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
+++ b/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
@@ -29,9 +29,7 @@ from glustolibs.gluster.lib_utils import form_bricks_list
from glustolibs.gluster.brick_ops import remove_brick
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.mount_ops import mount_volume, umount_volume
-from glustolibs.io.utils import (
- wait_for_io_to_complete,
- validate_io_procs)
+from glustolibs.io.utils import validate_io_procs, wait_for_io_to_complete
from glustolibs.gluster.glusterdir import rmdir
from glustolibs.gluster.gluster_init import restart_glusterd
@@ -173,15 +171,13 @@ class TestRemoveBrickAfterRestartGlusterd(GlusterBaseClass):
self.all_mounts_procs.append(proc)
self.io_validation_complete = False
- # wait for io to complete
- self.assertTrue(
- wait_for_io_to_complete(self.all_mounts_procs, self.mounts),
- "Io failed to complete on some of the clients")
-
# Validate IO
ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.io_validation_complete = True
self.assertTrue(ret, "IO failed on some of the clients")
+ if ret:
+ wait_for_io_to_complete(self.all_mounts_procs, self.mounts)
+ g.log.info("wait for io completed")
+ self.io_validation_complete = True
remove_brick_list = bricks_list[2:4]
ret, _, _ = remove_brick(self.mnode, self.volname, remove_brick_list,