Skip to content

Commit

Permalink
qa/cephfs: fix test_evict_client
Browse files Browse the repository at this point in the history
explictly kill stale session, otherwise session count check is racy.

Fixes: https://tracker.ceph.com/issues/40173
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
  • Loading branch information
ukernel committed Jun 5, 2019
1 parent 93c056c commit 4fd0202
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qa/tasks/cephfs/test_misc.py
Expand Up @@ -122,13 +122,16 @@ def test_evict_client(self):
ls_data = self.fs.mds_asok(['session', 'ls'])
self.assert_session_count(1, ls_data)

mount_a_client_id = self.mount_a.get_global_id()
self.mount_a.kill()
self.mount_a.kill_cleanup()

time.sleep(session_autoclose * 1.5)
ls_data = self.fs.mds_asok(['session', 'ls'])
self.assert_session_count(1, ls_data)

self.fs.mds_asok(['session', 'evict', "%s" % mount_a_client_id])

self.mount_a.mount()
self.mount_a.wait_until_mounted()
self.mount_b.mount()
Expand Down

0 comments on commit 4fd0202

Please sign in to comment.