summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py')
-rw-r--r--tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py b/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py
index e9a6681f4..11ca0dd77 100644
--- a/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py
+++ b/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py
@@ -16,7 +16,10 @@
# pylint: disable=too-many-statements, too-many-locals, unused-variable
+import sys
+
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.brick_libs import (get_all_bricks,
@@ -41,7 +44,7 @@ class TestSelfHeal(GlusterBaseClass):
def setUpClass(cls):
# Calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Upload io scripts for running IO on mounts
g.log.info("Upload io scripts to clients %s for running IO on "
@@ -82,7 +85,7 @@ class TestSelfHeal(GlusterBaseClass):
raise ExecutionError("Failed to create volume")
g.log.info("Successful in cleaning up Volume %s", cls.volname)
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_afr_gfid_heal(self):
@@ -115,9 +118,10 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("creating 5 files from mount point")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = ("python %s create_files "
- "-f 5 --base-file-name test_file --fixed-file-size 1k %s"
- % (self.script_upload_path, mount_obj.mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files -f 5 "
+ "--base-file-name test_file --fixed-file-size 1k %s" % (
+ sys.version_info.major, self.script_upload_path,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -151,9 +155,10 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("creating 5 new files of same name from mount point")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = ("python %s create_files "
- "-f 5 --base-file-name test_file --fixed-file-size 10k %s"
- % (self.script_upload_path, mount_obj.mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files -f 5 "
+ "--base-file-name test_file --fixed-file-size 10k %s" % (
+ sys.version_info.major, self.script_upload_path,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)