]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: import only sleep() from time
authorRishabh Dave <ridave@redhat.com>
Mon, 2 Oct 2023 19:47:42 +0000 (01:17 +0530)
committerRishabh Dave <ridave@redhat.com>
Sat, 6 Apr 2024 10:14:16 +0000 (15:44 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 69e4c9e4729fd0d29ed43fb1f6e94cb1804a3f74)

Conflicts:
* qa/tasks/cephfs/test_admin.py
  The commit needs an update so that importing "sleep" from "time"
  instead of importing "time" fully works on Reef branch too.

qa/tasks/cephfs/test_admin.py

index 85b6a9225930f8e96bd5ef67b2780fc57e942e12..252d85c76447c5b988a1b5d0aea5965997de008a 100644 (file)
@@ -1,10 +1,10 @@
 import errno
 import json
 import logging
-import time
 import uuid
 from io import StringIO
 from os.path import join as os_path_join
+from time import sleep
 
 from teuthology.exceptions import CommandFailedError
 from teuthology.contextutil import safe_while
@@ -33,7 +33,7 @@ class TestLabeledPerfCounters(CephFSTestCase):
             return counters[0]
 
         # sleep a bit so that we get updated clients...
-        time.sleep(10)
+        sleep(10)
 
         # lookout for clients...
         dump = self.fs.rank_tell(["counter", "dump"])
@@ -854,7 +854,7 @@ class TestDump(CephFSTestCase):
             self.fs.set_joinable(b)
             b = not b
 
-        time.sleep(10) # for tick/compaction
+        sleep(10) # for tick/compaction
 
         try:
             self.fs.status(epoch=epoch)
@@ -878,7 +878,7 @@ class TestDump(CephFSTestCase):
 
         # force a new fsmap
         self.fs.set_joinable(False)
-        time.sleep(10) # for tick/compaction
+        sleep(10) # for tick/compaction
 
         status = self.fs.status()
         log.debug(f"new epoch is {status['epoch']}")