summaryrefslogtreecommitdiffstats
path: root/tests/functional/quota/test_limit_usage_deep_dir.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/quota/test_limit_usage_deep_dir.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/quota/test_limit_usage_deep_dir.py')
-rw-r--r--tests/functional/quota/test_limit_usage_deep_dir.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/functional/quota/test_limit_usage_deep_dir.py b/tests/functional/quota/test_limit_usage_deep_dir.py
index 96cdd14..092bac4 100644
--- a/tests/functional/quota/test_limit_usage_deep_dir.py
+++ b/tests/functional/quota/test_limit_usage_deep_dir.py
@@ -46,11 +46,9 @@ class LimitUsageDeepDir(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)