summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilind Waykole <milindwaykole96@gmail.com>2019-10-22 10:53:43 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-10-23 09:15:32 +0000
commit3f6745cfcca0b0386c28d8415017a38eb093501f (patch)
treee3394baf246237aef1b2681cd149479fe8b65016
parent0f149a21604cc545ad618014443230295cf71fd1 (diff)
[fix] Turning off only client side heal option at the start of the test
Earlier in the testcase we were turning off shd which is not correct and we have to turn off only client side heal options as mentioned below metadata-self-heal entry-self-heal data-self-heal After renaming files we have to turn on these options while doing a look up from client Change-Id: I8c76abb8e79620c412e5991f5d8255b6b2a850e8 Signed-off-by: Milind Waykole <milindwaykole96@gmail.com>
-rwxr-xr-xtests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py b/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py
index 48163c6..8b2b0ff 100755
--- a/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py
+++ b/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py
@@ -91,7 +91,7 @@ class ArbiterSelfHealTests(GlusterBaseClass):
def test_no_data_loss_arbiter_vol_after_rename_file(self):
"""
- Create a 1x(2+1) arbiter replicate volume
- - Turn off self-heal daemon
+ - Turn off Clients side healing option
- Create a directory 'test_dir'
- Bring down the 1-st data brick
- Create a file under 'test_dir'
@@ -99,6 +99,7 @@ class ArbiterSelfHealTests(GlusterBaseClass):
- Bring up the 1-st data brick
- Rename file under 'test_dir'
- Bring up the 2-nd data brick
+ - Turn on Clients side healing option
- Trigger heal
- Check if no pending heals
- Check if md5sum on mountpoint is the same for md5sum_node on nodes
@@ -107,7 +108,9 @@ class ArbiterSelfHealTests(GlusterBaseClass):
test_dir = 'test_dir'
# Setting options
- options = {"self-heal-daemon": "off"}
+ options = {"cluster.metadata-self-heal": "off",
+ "cluster.entry-self-heal": "off",
+ "cluster.data-self-heal": "off"}
g.log.info('Setting options %s for volume %s...',
options, self.volname)
ret = set_volume_options(self.mnode, self.volname, options)
@@ -115,11 +118,11 @@ class ArbiterSelfHealTests(GlusterBaseClass):
% (options, self.volname))
g.log.info("Successfully set %s for volume %s",
options, self.volname)
-
- # Check if options are set to off
options_dict = get_volume_options(self.mnode, self.volname)
- self.assertEqual(options_dict['cluster.self-heal-daemon'], 'off',
- 'Option self-heal-daemon is not set to off')
+ # validating options are off
+ for opt in options:
+ self.assertEqual(options_dict[opt], 'off',
+ 'options are not set to off')
g.log.info('Option are set to off for volume %s: %s',
options, self.volname)
@@ -217,7 +220,7 @@ class ArbiterSelfHealTests(GlusterBaseClass):
self.mounts[0].mountpoint,
test_dir))
ret, _, err = g.run(self.mounts[0].client_system, command)
- self.assertFalse(ret, err)
+ self.assertEqual(ret, 0, err)
g.log.info("Renaming file for %s:%s is successful",
self.mounts[0].client_system, self.mounts[0].mountpoint)
@@ -246,7 +249,6 @@ class ArbiterSelfHealTests(GlusterBaseClass):
self.assertTrue(ret, 'Failed to set options %s' % options)
g.log.info("Successfully set %s for volume %s",
options, self.volname)
-
# Trigger heal from mount point
g.log.info("Triggering heal for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)