From d9b56582e8190ad80fc3b03b3476cd408c487023 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 5 Apr 2020 20:44:20 +0800 Subject: [PATCH] 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 (cherry picked from commit 83e41daec4d7353361d3897770ad31f79bc80681) --- qa/tasks/cephfs/test_misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/tasks/cephfs/test_misc.py b/qa/tasks/cephfs/test_misc.py index 887290dbb1ff9..cd72ac38eb8d3 100644 --- a/qa/tasks/cephfs/test_misc.py +++ b/qa/tasks/cephfs/test_misc.py @@ -48,7 +48,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() -- 2.39.5