From: Patrick Donnelly Date: Fri, 29 Sep 2017 15:48:14 +0000 (-0700) Subject: qa: relax cap expected value check X-Git-Tag: v12.2.2~81^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1021fe235ca756337e3a3ff4804680c1e93b0270;p=ceph.git qa: relax cap expected value check Signed-off-by: Patrick Donnelly (cherry picked from commit b37c7f7db7f0d76e524aabdad6dd0f16548268a6) --- diff --git a/qa/tasks/cephfs/test_client_limits.py b/qa/tasks/cephfs/test_client_limits.py index 14ac2c40826..cb5e3a46252 100644 --- a/qa/tasks/cephfs/test_client_limits.py +++ b/qa/tasks/cephfs/test_client_limits.py @@ -84,13 +84,14 @@ class TestClientLimits(CephFSTestCase): # The remaining caps should comply with the numbers sent from MDS in SESSION_RECALL message, # which depend on the caps outstanding, cache size and overall ratio + recall_expected_value = int((1.0-mds_max_ratio_caps_per_client)*(open_files+2)) def expected_caps(): num_caps = self.get_session(mount_a_client_id)['num_caps'] if num_caps < mds_min_caps_per_client: - raise + raise RuntimeError("client caps fell below min!") elif num_caps == mds_min_caps_per_client: return True - elif num_caps == int((1.0-mds_max_ratio_caps_per_client)*(open_files+2)): + elif recall_expected_value*.95 <= num_caps <= recall_expected_value*1.05: return True else: return False