path: root/tests/functional/glusterd
diff options
authorBala Konda Reddy M <>2019-01-18 16:10:32 +0530
committerVijay Avuthu <>2019-01-22 13:26:39 +0000
commit3f9c3e3424039cbffb913e77b0f8a07465f0610e (patch)
treed629b2990a5dfe185858bf0cc27f4f09f35b4f31 /tests/functional/glusterd
parent094caab49b43bbc5afe72745b858f64d7fd19fe1 (diff)
Fix: Volume create should fail when a node is down
Earlier while volume creation randomly selected one node and stopped gluster but the volume type used in the test is pure distribute and default glusto config takes 4 bricks. With the fix now randomly selecting only first 4 nodes for volume creation and it will fail. Change-Id: I3cf2fc8281c9747b190e1fe9ef471edbb2c4d2ca Signed-off-by: Bala Konda Reddy M <>
Diffstat (limited to 'tests/functional/glusterd')
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/functional/glusterd/ b/tests/functional/glusterd/
index 3a181597b..4046b8130 100644
--- a/tests/functional/glusterd/
+++ b/tests/functional/glusterd/
@@ -197,7 +197,11 @@ class TestVolumeCreate(GlusterBaseClass):
self.assertTrue(ret, "Peer probe is failed")"Peer probe to all the servers is success")
- random_server = self.servers[random.randint(1, len(self.servers) - 1)]
+ # Taking random node from the first four nodes as the
+ # volume getting created is using first four nodes
+ # Excluding servers[0] as it is mnode
+ first_four_servers = self.servers[:4]
+ random_server = random.choice(first_four_servers[1:])
ret = stop_glusterd(random_server)
self.assertTrue(ret, "Glusterd is stopped successfully")
@@ -205,6 +209,6 @@ class TestVolumeCreate(GlusterBaseClass):
ret = setup_volume(self.mnode, self.all_servers_info, self.volume)
self.assertFalse(ret, "Expected: It should fail to create a volume "
"when one of the node is down. Actual: Successfully "
- "created the volume with bbrick whose node is down")
+ "created the volume with brick whose node is down")"Failed to create the volume with brick whose node is down")