From: Naoki Kambe Date: Fri, 25 Jan 2013 06:48:26 +0000 (+0900) Subject: [2225_statistics_2] fix the failure in the build bot X-Git-Tag: bind10-1.0.0-rc-release~76^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89fd37be8d063c6fce0fa731ab7f3ac9c45667ef;p=thirdparty%2Fkea.git [2225_statistics_2] fix the failure in the build bot 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'. --- diff --git a/src/lib/python/isc/statistics/tests/counters_test.py b/src/lib/python/isc/statistics/tests/counters_test.py index ff15efc2ec..550fd1f9a9 100644 --- a/src/lib/python/isc/statistics/tests/counters_test.py +++ b/src/lib/python/isc/statistics/tests/counters_test.py @@ -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"""