diff options
author | Bala Konda Reddy M <bmekala@redhat.com> | 2019-01-18 16:10:32 +0530 |
---|---|---|
committer | Vijay Avuthu <vavuthu@redhat.com> | 2019-01-22 13:26:39 +0000 |
commit | 3f9c3e3424039cbffb913e77b0f8a07465f0610e (patch) | |
tree | d629b2990a5dfe185858bf0cc27f4f09f35b4f31 /tests/functional | |
parent | 094caab49b43bbc5afe72745b858f64d7fd19fe1 (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 <bmekala@redhat.com>
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/glusterd/test_volume_create.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/functional/glusterd/test_volume_create.py b/tests/functional/glusterd/test_volume_create.py index 3a181597b..4046b8130 100644 --- a/tests/functional/glusterd/test_volume_create.py +++ b/tests/functional/glusterd/test_volume_create.py @@ -197,7 +197,11 @@ class TestVolumeCreate(GlusterBaseClass): self.assertTrue(ret, "Peer probe is failed") g.log.info("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") g.log.info("Failed to create the volume with brick whose node is down") |