summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_profile_operations_with_one_node_down.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/glusterd/test_profile_operations_with_one_node_down.py')
-rw-r--r--tests/functional/glusterd/test_profile_operations_with_one_node_down.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/functional/glusterd/test_profile_operations_with_one_node_down.py b/tests/functional/glusterd/test_profile_operations_with_one_node_down.py
index 762d7cea5..7b7e0409e 100644
--- a/tests/functional/glusterd/test_profile_operations_with_one_node_down.py
+++ b/tests/functional/glusterd/test_profile_operations_with_one_node_down.py
@@ -19,9 +19,12 @@
Tests to check basic profile operations with one node down.
"""
-from time import sleep
from random import randint
+import sys
+from time import sleep
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.profile_ops import (profile_start, profile_info,
@@ -40,7 +43,7 @@ class TestProfileOpeartionsWithOneNodeDown(GlusterBaseClass):
@classmethod
def setUpClass(cls):
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Uploading file_dir script in all client direcotries
g.log.info("Upload io scripts to clients %s for running IO on "
@@ -58,7 +61,7 @@ class TestProfileOpeartionsWithOneNodeDown(GlusterBaseClass):
def setUp(self):
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
# Creating Volume and mounting volume.
ret = self.setup_volume_and_mount_volume(self.mounts)
if not ret:
@@ -93,7 +96,7 @@ class TestProfileOpeartionsWithOneNodeDown(GlusterBaseClass):
raise ExecutionError("Unable to delete volume % s" % self.volname)
g.log.info("Volume deleted successfully : %s", self.volname)
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_profile_operations_with_one_node_down(self):
@@ -116,14 +119,14 @@ class TestProfileOpeartionsWithOneNodeDown(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dir-depth 4 "
"--dirname-start-num %d "
"--dir-length 6 "
"--max-num-of-dirs 3 "
- "--num-of-files 5 %s"
- % (self.script_upload_path, counter,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path,
+ counter, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
self.all_mounts_procs.append(proc)