Browse Source

[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'.
Naoki Kambe 12 years ago
parent
commit
89fd37be8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/python/isc/statistics/tests/counters_test.py

+ 1 - 1
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"""