]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2225_statistics_2] fix the failure in the build bot
authorNaoki Kambe <kambe@jprs.co.jp>
Fri, 25 Jan 2013 06:48:26 +0000 (15:48 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Fri, 25 Jan 2013 06:48:26 +0000 (15:48 +0900)
http://git.bind10.isc.org/~tester/builder//BIND10-cppcheck/20130125000502-FreeBSD8-amd64-GCC/logs/unittests.out

Due to the difference of timing of invoking datetime.now(), _stop_timer()
should return greater than one second. But depending on runtime environment, it
happens to return one second exactly. For supporting this behaviour, regarding
checking of the returned value, 'assertGreater' is changed to
'assertGreaterEqual'.

src/lib/python/isc/statistics/tests/counters_test.py

index ff15efc2ecd0ef53980d9f300634e43dceb8531c..550fd1f9a936444a347d521c9a9d60536431c4cb 100644 (file)
@@ -120,7 +120,7 @@ class TestBasicMethods(unittest.TestCase):
                   'item_type': 'real',
                   'item_default': 0.0 }]
         counters._stop_timer(t2, elem, spec, 'time')
-        self.assertGreater(counters._get_counter(elem,'time'), 1)
+        self.assertGreaterEqual(counters._get_counter(elem,'time'), 1.0)
 
     def test_rasing_incrementers(self):
         """ use Thread"""