]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: don't use int() to convert string of float point number 16288/head
authorYan, Zheng <zyan@redhat.com>
Wed, 12 Jul 2017 11:09:30 +0000 (19:09 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 13 Jul 2017 07:55:22 +0000 (15:55 +0800)
Fixes: http://tracker.ceph.com/issues/20582
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
qa/tasks/cephfs/cephfs_test_case.py
qa/tasks/cephfs/test_client_limits.py
qa/tasks/cephfs/test_failover.py

index 72e8e9f03c01202c011c22d79752384683446dec..29ad941ea5b512ebf8fe8c971dc79a165be28ec7 100644 (file)
@@ -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]))
 
index d8675fdad8b16eebed38ce98308929003838e374..0b64b6e99cde387c9ac2b11f79186d105ea50e16 100644 (file)
@@ -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
index 53c2d5e301e7d0478aa1c3ca88cac58cbbc936bf..9d3392c6953834c286c0ad010db0d85a027e76b3 100644 (file)
@@ -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)