summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_snapshot_create.py
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2019-12-19 11:46:34 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2020-01-07 12:11:31 +0000
commit1821490ff915bcc2a575b8cda9da84d57be595af (patch)
tree2f3f77e7cc1a718ac71a919b6d5326b43d07834c /tests/functional/snapshot/test_snapshot_create.py
parentd131ce9f70c528cdd50aa0d4f2923f5a9f14aefc (diff)
[Fix] Remove variable script_local_path(Part 1)
Removing script_local_path as both script_local_path and cls.script_upload_path hold the same values which makes each script slow. This will help decrease the execution time of the test suite. PoC: $cat test.py a = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") b = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") $time python test.py real 0m0.063s user 0m0.039s sys 0m0.019s $cat test.py a = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") $time python test.py real 0m0.013s user 0m0.009s sys 0m0.003s Code changes needed: From: script_local_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") ret = upload_scripts(cls.clients, script_local_path) To: cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") ret = upload_scripts(cls.clients, cls.script_upload_path) Change-Id: I7908b3b418bbc929b7cc3ff81e3675310eecdbeb Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/snapshot/test_snapshot_create.py')
-rw-r--r--tests/functional/snapshot/test_snapshot_create.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/functional/snapshot/test_snapshot_create.py b/tests/functional/snapshot/test_snapshot_create.py
index 44312b583..a8e6c1c47 100644
--- a/tests/functional/snapshot/test_snapshot_create.py
+++ b/tests/functional/snapshot/test_snapshot_create.py
@@ -64,11 +64,9 @@ class SnapCreate(GlusterBaseClass):
# Upload io scripts for running IO on mounts
g.log.info("Upload io scripts to clients %s for running IO on "
"mounts", cls.clients)
- script_local_path = ("/usr/share/glustolibs/io/scripts/"
- "file_dir_ops.py")
cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/"
"file_dir_ops.py")
- ret = upload_scripts(cls.clients, script_local_path)
+ ret = upload_scripts(cls.clients, cls.script_upload_path)
if not ret:
raise ExecutionError("Failed to upload IO scripts to clients %s" %
cls.clients)