From: Yan, Zheng Date: Tue, 23 Jul 2019 12:21:07 +0000 (+0800) Subject: qa/cephfs: test case for timeout config of individual session X-Git-Tag: v12.2.13~44^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ddd56cbb2a2e5d164f046fc0502eb18534e2237b;p=ceph.git qa/cephfs: test case for timeout config of individual session Signed-off-by: "Yan, Zheng" (cherry picked from commit 4b28a4a7569ab516d75752c97226f598e6229ca2) Conflicts: qa/tasks/cephfs/test_client_recovery.py --- diff --git a/qa/tasks/cephfs/test_client_recovery.py b/qa/tasks/cephfs/test_client_recovery.py index 2b91cbfe6a1..880208a4da7 100644 --- a/qa/tasks/cephfs/test_client_recovery.py +++ b/qa/tasks/cephfs/test_client_recovery.py @@ -519,3 +519,21 @@ class TestClientRecovery(CephFSTestCase): self.fs.mds_asok(['session', 'evict', "%s" % mount_a_client_id]) self.mount_a.umount_wait(require_clean=True, timeout=30) + + def test_config_session_timeout(self): + session_timeout = self.fs.get_var("session_timeout") + mount_a_gid = self.mount_a.get_global_id() + + self.fs.mds_asok(['session', 'config', '%s' % mount_a_gid, 'timeout', '%s' % (session_timeout * 2)]) + + self.mount_a.kill(); + + self.assert_session_count(2) + + time.sleep(session_timeout * 1.5) + self.assert_session_state(mount_a_gid, "open") + + time.sleep(session_timeout) + self.assert_session_count(1) + + self.mount_a.kill_cleanup()