From: Yan, Zheng Date: Wed, 12 Jul 2017 11:09:30 +0000 (+0800) Subject: qa/cephfs: don't use int() to convert string of float point number X-Git-Tag: ses5-milestone9~1^2~31^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e4844706b0a4d96f604a7fb0cbe9fc06559a305c;p=ceph.git qa/cephfs: don't use int() to convert string of float point number Fixes: http://tracker.ceph.com/issues/20582 Signed-off-by: "Yan, Zheng" --- diff --git a/qa/tasks/cephfs/cephfs_test_case.py b/qa/tasks/cephfs/cephfs_test_case.py index 72e8e9f03c01..29ad941ea5b5 100644 --- a/qa/tasks/cephfs/cephfs_test_case.py +++ b/qa/tasks/cephfs/cephfs_test_case.py @@ -159,7 +159,7 @@ class CephFSTestCase(CephTestCase): # Load an config settings of interest for setting in self.LOAD_SETTINGS: - setattr(self, setting, int(self.fs.mds_asok( + setattr(self, setting, float(self.fs.mds_asok( ['config', 'get', setting], self.mds_cluster.mds_ids[0] )[setting])) diff --git a/qa/tasks/cephfs/test_client_limits.py b/qa/tasks/cephfs/test_client_limits.py index d8675fdad8b1..0b64b6e99cde 100644 --- a/qa/tasks/cephfs/test_client_limits.py +++ b/qa/tasks/cephfs/test_client_limits.py @@ -61,7 +61,7 @@ class TestClientLimits(CephFSTestCase): # MDS should not be happy about that, as the client is failing to comply # with the SESSION_RECALL messages it is being sent - mds_recall_state_timeout = int(self.fs.get_config("mds_recall_state_timeout")) + mds_recall_state_timeout = float(self.fs.get_config("mds_recall_state_timeout")) self.wait_for_health("MDS_HEALTH_CLIENT_RECALL", mds_recall_state_timeout + 10) @@ -122,7 +122,7 @@ class TestClientLimits(CephFSTestCase): # After mds_revoke_cap_timeout, we should see a health warning (extra lag from # MDS beacon period) - mds_revoke_cap_timeout = int(self.fs.get_config("mds_revoke_cap_timeout")) + mds_revoke_cap_timeout = float(self.fs.get_config("mds_revoke_cap_timeout")) self.wait_for_health("MDS_CLIENT_RECALL", mds_revoke_cap_timeout + 10) # Client B should still be stuck diff --git a/qa/tasks/cephfs/test_failover.py b/qa/tasks/cephfs/test_failover.py index 53c2d5e301e7..9d3392c69538 100644 --- a/qa/tasks/cephfs/test_failover.py +++ b/qa/tasks/cephfs/test_failover.py @@ -32,7 +32,7 @@ class TestFailover(CephFSTestCase): # Kill the rank 0 daemon's physical process self.fs.mds_stop(original_active) - grace = int(self.fs.get_config("mds_beacon_grace", service_type="mon")) + grace = float(self.fs.get_config("mds_beacon_grace", service_type="mon")) # Wait until the monitor promotes his replacement def promoted(): @@ -65,7 +65,7 @@ class TestFailover(CephFSTestCase): if not require_active: raise case.SkipTest("fuse_require_active_mds is not set") - grace = int(self.fs.get_config("mds_beacon_grace", service_type="mon")) + grace = float(self.fs.get_config("mds_beacon_grace", service_type="mon")) # Check it's not laggy to begin with (original_active, ) = self.fs.get_active_names() @@ -102,7 +102,7 @@ class TestFailover(CephFSTestCase): # Need all my standbys up as well as the active daemons self.wait_for_daemon_start() - grace = int(self.fs.get_config("mds_beacon_grace", service_type="mon")) + grace = float(self.fs.get_config("mds_beacon_grace", service_type="mon")) standbys = self.mds_cluster.get_standby_daemons() self.assertGreaterEqual(len(standbys), 1)