Browse Source

[2225_statistics_3] change assertGreater() to assertGreaterEqual()

http://git.bind10.isc.org/~tester/builder//BIND10-cppcheck/20130129171501-FreeBSD8-amd64-GCC/logs/unittests.out
http://git.bind10.isc.org/~tester/builder//BIND10-cppcheck/20130205115001-FreeBSD8-amd64-GCC/logs/unittests.out

As the above results, on this platform, it doesn't mostly return an
accurate float of seconds which is less than 1.0. The above failure
happened at line 203 in counters_test.py , but also at line 142 there
is probably the same problem.  This fix is similar to
89fd37be8d063c6fce0fa731ab7f3ac9c45667ef.
Naoki Kambe 12 years ago
parent
commit
ffd4a283b1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/lib/python/isc/statistics/tests/counters_test.py

+ 3 - 3
src/lib/python/isc/statistics/tests/counters_test.py

@@ -139,9 +139,9 @@ class TestBasicMethods(unittest.TestCase):
             counters._get_counter(self.counters._statistics._data,
                                  counter_name),
             concurrency * number)
-        self.assertGreater(
+        self.assertGreaterEqual(
             counters._get_counter(self.counters._statistics._data,
-                                 timer_name), 0)
+                                 timer_name), 0.0)
 
     def test_concat(self):
         # only strings
@@ -200,7 +200,7 @@ class BaseTestCounters():
             if name.find('time_to_') == 0:
                 self.counters.start_timer(*args)
                 self.counters.stop_timer(*args)
-                self.assertGreater(self.counters.get(*args), 0)
+                self.assertGreaterEqual(self.counters.get(*args), 0.0)
                 sec = self.counters.get(*args)
                 for zone_str in (self._entire_server, TEST_ZONE_NAME_STR):
                     isc.cc.data.set(self._statistics_data,