summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-03-26 16:48:29 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-04-14 08:44:37 +0000
commit5b5a1186385bc4cffa28db404eca313b455e8c6b (patch)
treeed00be1334d1b2088bdab65640c7f66bfb29fbf4 /tests
parent02fc4306dd7adab360d64791661f4b636fc763fb (diff)
[testfix] Add steps in teardown to wait for all bricks online
Add steps wait_for_bricks_to_be_online in teardown after the glusterd is started in teststeps Change-Id: Id30a3d870c6ba7c77b0e79604521ec41fe624822 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/glusterd/test_rebalance_hang.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/functional/glusterd/test_rebalance_hang.py b/tests/functional/glusterd/test_rebalance_hang.py
index 7911eb277..90b31d222 100644
--- a/tests/functional/glusterd/test_rebalance_hang.py
+++ b/tests/functional/glusterd/test_rebalance_hang.py
@@ -18,7 +18,8 @@ from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
from glustolibs.gluster.volume_ops import (volume_create, volume_start,
get_volume_list, get_volume_status)
-from glustolibs.gluster.brick_libs import get_all_bricks
+from glustolibs.gluster.brick_libs import (
+ get_all_bricks, wait_for_bricks_to_be_online)
from glustolibs.gluster.volume_libs import (cleanup_volume)
from glustolibs.gluster.peer_ops import (peer_probe, peer_detach,
peer_probe_servers,
@@ -61,6 +62,11 @@ class TestRebalanceHang(GlusterBaseClass):
vol_list = get_volume_list(self.mnode)
if vol_list is not None:
for volume in vol_list:
+ # check all bricks are online
+ ret = wait_for_bricks_to_be_online(self.mnode, volume)
+ if not ret:
+ raise ExecutionError("Failed to bring bricks online"
+ "for volume %s" % volume)
ret = cleanup_volume(self.mnode, volume)
if not ret:
raise ExecutionError("Failed to cleanup volume")