From: Naoki Kambe Date: Wed, 6 Feb 2013 00:19:05 +0000 (+0900) Subject: [2225_statistics_3] change assertGreater() to assertGreaterEqual() X-Git-Tag: bind10-1.0.0-rc-release~27^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffd4a283b18f8eaa453712e1e615e2440b12aa0d;p=thirdparty%2Fkea.git [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. --- diff --git a/src/lib/python/isc/statistics/tests/counters_test.py b/src/lib/python/isc/statistics/tests/counters_test.py index 550fd1f9a9..2d791c4318 100644 --- a/src/lib/python/isc/statistics/tests/counters_test.py +++ b/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,