summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryinkui <13965432176@163.com>2019-09-08 14:06:23 +0800
committerBala Konda Reddy M <bmekala@redhat.com>2019-10-15 13:46:47 +0000
commite40b6364ef7e696f23e8feea43765d576e47d53d (patch)
tree410c92b22f7ddbe678e8fc077098095546ccd881
parentc3d85c227ac74bf110d14bfd46561b98b6ca98c3 (diff)
[Fix] Adding count++ to prevent test from running in infinite loop
In a few testcases in glusterd count++ is missing due to which the testcase in an infinite loop. Fixing that and sending patch. Change-Id: I56a355f6ea3ae79231e09d7aee80031da3ebec52 Signed-off-by: yinkui <13965432176@163.com> Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
-rw-r--r--tests/functional/glusterd/test_detach_node_used_to_mount.py1
-rw-r--r--tests/functional/glusterd/test_volume_create_with_glusterd_restarts.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/glusterd/test_detach_node_used_to_mount.py b/tests/functional/glusterd/test_detach_node_used_to_mount.py
index 330899b..e5b2a70 100644
--- a/tests/functional/glusterd/test_detach_node_used_to_mount.py
+++ b/tests/functional/glusterd/test_detach_node_used_to_mount.py
@@ -72,6 +72,7 @@ class TestChangeReservcelimit(GlusterBaseClass):
if ret:
break
sleep(3)
+ count += 1
# Unmounting and cleaning volume
ret, _, _ = umount_volume(mclient=self.mounts[0].client_system,
diff --git a/tests/functional/glusterd/test_volume_create_with_glusterd_restarts.py b/tests/functional/glusterd/test_volume_create_with_glusterd_restarts.py
index 6256e85..7021cc9 100644
--- a/tests/functional/glusterd/test_volume_create_with_glusterd_restarts.py
+++ b/tests/functional/glusterd/test_volume_create_with_glusterd_restarts.py
@@ -36,6 +36,7 @@ class TestVolumeCreateWithGlusterdRestarts(GlusterBaseClass):
if ret:
break
sleep(3)
+ count += 1
# clean up volumes
ret = cleanup_volume(self.mnode, self.volname)
@@ -90,6 +91,7 @@ class TestVolumeCreateWithGlusterdRestarts(GlusterBaseClass):
if ret:
break
sleep(3)
+ count += 1
self.assertTrue(ret, "Peers are not in connected state.")
g.log.info("Peers are in connected state.")
@@ -114,5 +116,6 @@ class TestVolumeCreateWithGlusterdRestarts(GlusterBaseClass):
if ret:
break
sleep(3)
+ count += 1
self.assertTrue(ret, "Peers are not in connected state.")
g.log.info("Peers are in connected state.")