From: Kefu Chai Date: Sun, 5 Apr 2020 12:44:20 +0000 (+0800) Subject: qa/tasks/cephfs: compare number with number X-Git-Tag: wip-pdonnell-testing-20200918.022351~1585^2~34 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=83e41daec4d7353361d3897770ad31f79bc80681;p=ceph-ci.git qa/tasks/cephfs: compare number with number to address following failure: ``` 2020-04-05T12:25:30.997 INFO:tasks.cephfs_test_runner:Traceback (most recent call last): 2020-04-05T12:25:30.997 INFO:tasks.cephfs_test_runner: File "/home/teuthworker/src/github.com_tchaikov_ceph_wip-qa-py3/qa/tasks/cephfs/test_misc.py", line 50, in test_root_rctime 2020-04-05T12:25:30.998 INFO:tasks.cephfs_test_runner: self.assertGreaterEqual(rctime, t-10) 2020-04-05T12:25:30.998 INFO:tasks.cephfs_test_runner: File "/usr/lib/python3.5/unittest/case.py", line 1215, in assertGreaterEqual 2020-04-05T12:25:30.998 INFO:tasks.cephfs_test_runner: if not a >= b: 2020-04-05T12:25:30.999 INFO:tasks.cephfs_test_runner:TypeError: unorderable types: str() >= float() ``` Signed-off-by: Kefu Chai --- diff --git a/qa/tasks/cephfs/test_misc.py b/qa/tasks/cephfs/test_misc.py index 342fb76d4db..15fac2cf505 100644 --- a/qa/tasks/cephfs/test_misc.py +++ b/qa/tasks/cephfs/test_misc.py @@ -47,7 +47,7 @@ class TestMisc(CephFSTestCase): t = time.time() rctime = self.mount_a.getfattr(".", "ceph.dir.rctime") log.info("rctime = {}".format(rctime)) - self.assertGreaterEqual(rctime, t-10) + self.assertGreaterEqual(float(rctime), t - 10) def test_fs_new(self): self.mount_a.umount_wait()