summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_volume_set_with_quorum_enabled.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_volume_set_with_quorum_enabled.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_volume_set_with_quorum_enabled.py')
-rw-r--r--tests/functional/glusterd/test_volume_set_with_quorum_enabled.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/functional/glusterd/test_volume_set_with_quorum_enabled.py b/tests/functional/glusterd/test_volume_set_with_quorum_enabled.py
index 68078387a..23598f007 100644
--- a/tests/functional/glusterd/test_volume_set_with_quorum_enabled.py
+++ b/tests/functional/glusterd/test_volume_set_with_quorum_enabled.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,6 +18,7 @@ from time import sleep
from glusto.core import Glusto as g
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
+from glustolibs.gluster.peer_ops import wait_for_peers_to_connect
from glustolibs.gluster.volume_ops import set_volume_options
from glustolibs.gluster.gluster_init import start_glusterd, stop_glusterd
@@ -50,15 +51,9 @@ class TestVolumeSetOpWithQuorum(GlusterBaseClass):
g.log.info("Successfully started glusterd.")
# Checking if peer is connected.
- counter = 0
- while counter < 30:
- ret = self.validate_peers_are_connected()
- counter += 1
- if ret:
- break
- sleep(3)
- if not ret:
- raise ExecutionError("Peer is not in connected state.")
+ ret = wait_for_peers_to_connect(self.mnode, self.servers)
+ self.assertTrue(ret, "glusterd is not connected %s with peer %s"
+ % (self.mnode, self.servers))
g.log.info("Peers is in connected state.")
# Setting Quorum ratio to 51%