]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/cephfs: rename mounted() to mounted_wait()
authorXiubo Li <xiubli@redhat.com>
Fri, 3 Apr 2020 23:10:57 +0000 (19:10 -0400)
committerXiubo Li <xiubli@redhat.com>
Tue, 14 Apr 2020 11:47:04 +0000 (07:47 -0400)
The boolean self.mounted parameter is conflicted with mounted() helper,
so we will hit error like:

INFO:tasks.cephfs_test_runner:TypeError: 'bool' object is not callable

Fixes: https://tracker.ceph.com/issues/44044
Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/mount.py
qa/tasks/cephfs/test_journal_migration.py

index dfea9cf154f37d7296d4b261765d7f7d124481ea..9e9c2b1c5567c5107567f451b840baedc598ff9b 100644 (file)
@@ -491,7 +491,7 @@ class CephFSMount(object):
         return "/etc/ceph/ceph.conf"
 
     @contextmanager
-    def mounted(self):
+    def mounted_wait(self):
         """
         A context manager, from an initially unmounted state, to mount
         this, yield, and then unmount and clean up.
index 8863b371f39662937144d9cf03ae17365d2ac160..67b514c22f1c3aca6ce257d76e63abe311699aa4 100644 (file)
@@ -32,7 +32,7 @@ class TestJournalMigration(CephFSTestCase):
         self.assertTrue(self.fs.get_replay(status=status) is not None)
 
         # Do some client work so that the log is populated with something.
-        with self.mount_a.mounted():
+        with self.mount_a.mounted_wait():
             self.mount_a.create_files()
             self.mount_a.check_files()  # sanity, this should always pass
 
@@ -56,7 +56,7 @@ class TestJournalMigration(CephFSTestCase):
 
         # Check that files created in the initial client workload are still visible
         # in a client mount.
-        with self.mount_a.mounted():
+        with self.mount_a.mounted_wait():
             self.mount_a.check_files()
 
         # Verify that the journal really has been rewritten.
@@ -86,7 +86,7 @@ class TestJournalMigration(CephFSTestCase):
             raise RuntimeError("Unexpectedly few journal events: {0}".format(event_count))
 
         # Do some client work to check that writing the log is still working
-        with self.mount_a.mounted():
+        with self.mount_a.mounted_wait():
             workunit(self.ctx, {
                 'clients': {
                     "client.{0}".format(self.mount_a.client_id): ["fs/misc/trivial_sync.sh"],