diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-16 18:26:45 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-18 10:26:37 +0000 |
commit | 065f51e673b3ccc39b153423359bed2dd572935d (patch) | |
tree | f1c998d24aa463f567b4742f1c74f95893ffedef /tests/functional/dht/test_rebalance_start_when_glusterd_down.py | |
parent | b1dfa315487c2da399988775e5de39354f686b0c (diff) |
[py2to3] Add py3 support in 'tests/functional/dht'
Change-Id: I44fe85519c8fd381064670e54dac8736107b0928
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/dht/test_rebalance_start_when_glusterd_down.py')
-rw-r--r-- | tests/functional/dht/test_rebalance_start_when_glusterd_down.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/functional/dht/test_rebalance_start_when_glusterd_down.py b/tests/functional/dht/test_rebalance_start_when_glusterd_down.py index abe7eeac1..ea6ae2b6d 100644 --- a/tests/functional/dht/test_rebalance_start_when_glusterd_down.py +++ b/tests/functional/dht/test_rebalance_start_when_glusterd_down.py @@ -15,8 +15,11 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from random import choice +import sys from time import sleep + 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.rebalance_ops import ( @@ -40,7 +43,7 @@ class RebalanceValidation(GlusterBaseClass): def setUpClass(cls): # Calling GlusterBaseClass setUpClass - GlusterBaseClass.setUpClass.im_func(cls) + cls.get_super_method(cls, 'setUpClass')() # Setup Volume and Mount Volume g.log.info("Starting to Setup Volume and Mount Volume") @@ -69,14 +72,14 @@ class RebalanceValidation(GlusterBaseClass): for index, mount_obj in enumerate(cls.mounts, start=1): 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 " "--dirname-start-num %d " "--dir-depth 1 " "--dir-length 1 " "--max-num-of-dirs 1 " - "--num-of-files 1 %s" % (cls.script_upload_path, - index + 10, - mount_obj.mountpoint)) + "--num-of-files 1 %s" % ( + sys.version_info.major, cls.script_upload_path, + index + 10, mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) cls.all_mounts_procs.append(proc) @@ -203,4 +206,4 @@ class RebalanceValidation(GlusterBaseClass): g.log.info("Successful in Unmount Volume and Cleanup Volume") # Calling GlusterBaseClass tearDown - GlusterBaseClass.tearDownClass.im_func(cls) + cls.get_super_method(cls, 'tearDownClass')() |