summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py18
1 files changed, 17 insertions, 1 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 f84c7db..3b81dc6 100644
--- a/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
+++ b/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
@@ -14,6 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+from time import sleep
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,
@@ -22,7 +23,8 @@ from glustolibs.gluster.brick_libs import get_all_bricks
from glustolibs.gluster.volume_libs import (cleanup_volume)
from glustolibs.gluster.peer_ops import (peer_probe, peer_detach,
peer_probe_servers,
- nodes_from_pool_list)
+ nodes_from_pool_list,
+ is_peer_connected)
from glustolibs.gluster.lib_utils import form_bricks_list
from glustolibs.gluster.brick_ops import remove_brick
from glustolibs.gluster.exceptions import ExecutionError
@@ -101,6 +103,20 @@ class TestRemoveBrickAfterRestartGlusterd(GlusterBaseClass):
g.log.info("peer probe is success from %s to "
"%s", self.servers[0], self.servers[index])
+ # Validating whether the peer are connected or not
+ # In jenkins This case is failing saying peers are not in connected
+ # state, that is reason adding a check whether peers are connected
+ # or not
+ count = 0
+ while count < 30:
+ ret = is_peer_connected(self.mnode, my_servers)
+ if ret:
+ g.log.info("Peers are in connected state")
+ break
+ sleep(3)
+ count = count + 1
+ self.assertTrue(ret, "Some peers are not in connected state")
+
self.volname = "testvol"
bricks_list = form_bricks_list(self.mnode, self.volname, 4,
my_servers,