]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: test volumes plugin mount cleanup
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Dec 2019 23:14:49 +0000 (15:14 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 4 Dec 2019 15:01:42 +0000 (07:01 -0800)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_volumes.py

index c2c6cc4cff2945e9c833d20000147b8cf859c267..1a42e677c708de1311848d3b352f830db59683a6 100644 (file)
@@ -102,6 +102,21 @@ class TestVolumes(CephFSTestCase):
             self._delete_test_volume()
         super(TestVolumes, self).tearDown()
 
+    def test_connection_expiration(self):
+        # unmount any cephfs mounts
+        self.mount_a.umount_wait()
+        sessions = self._session_list()
+        self.assertLessEqual(len(sessions), 1) # maybe mgr is already mounted
+
+        # Get the mgr to definitely mount cephfs
+        subvolume = self._generate_random_subvolume_name()
+        self._fs_cmd("subvolume", "create", self.volname, subvolume)
+        sessions = self._session_list()
+        self.assertEqual(len(sessions), 1)
+
+        # Now wait for the mgr to expire the connection:
+        self.wait_until_evicted(sessions[0]['id'], timeout=90)
+
     def test_volume_rm(self):
         try:
             self._fs_cmd("volume", "rm", self.volname)