BIND 10 fix_stats_tests, updated. 98c413cdc6730033c8e428d22b77134cb6219995 [fix_stats_tests] fix for a platform which is not so accurate on time duration in seconds
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jan 30 02:39:22 UTC 2013
The branch, fix_stats_tests has been updated
via 98c413cdc6730033c8e428d22b77134cb6219995 (commit)
via a9fc08b8e6dca6a77c00580b96b53e22c454cfeb (commit)
from 6df36604b6c66f3878e4ee7f7883925bcf8c1e4a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 98c413cdc6730033c8e428d22b77134cb6219995
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jan 30 11:16:58 2013 +0900
[fix_stats_tests] fix for a platform which is not so accurate on time duration in seconds
http://git.bind10.isc.org/~tester/builder//BIND10-cppcheck/20130129171501-FreeBSD8-amd64-GCC/logs/unittests.out
As the above result, FreeBSD8 doesn't return floating seconds which
are less than 1.0. Replace assertGreater() with
assertGreaterEqual(). This fix is similar to
9fd37be8d063c6fce0fa731ab7f3ac9c45667ef.
commit a9fc08b8e6dca6a77c00580b96b53e22c454cfeb
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jan 30 11:30:38 2013 +0900
[fix_stats_tests] add notes for locking
-----------------------------------------------------------------------
Summary of changes:
src/bin/stats/tests/test_utils.py | 12 +++++++++---
.../python/isc/statistics/tests/counters_test.py | 6 +++---
2 files changed, 12 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index 56c1641..96d7f0f 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -534,8 +534,11 @@ class MyStatsHttpd(stats_httpd.StatsHttpd):
class BaseModules:
_lock = threading.RLock()
def __init__(self):
- # MockMsgq
+ # This locking is for dead-lock failures which often occurred
+ # while creating or deleting a socket file in msgq.py. See
+ # http://git.bind10.isc.org/~tester/builder//BIND10/20130129033301-NetBSD4-i386-GCC/logs/unittests.out.
with self._lock:
+ # MockMsgq
self.msgq = ThreadingServerManager(MockMsgq)
self.msgq.run()
# Check whether msgq is ready. A SessionTimeout is raised here if not.
@@ -554,9 +557,12 @@ class BaseModules:
def shutdown(self):
- # MockMsgq. We need to wait (blocking) for it, otherwise it'll wipe out
- # a socket for another test during its shutdown.
+ # This locking is for dead-lock failures which often occurred
+ # while creating or deleting a socket file in msgq.py. See
+ # http://git.bind10.isc.org/~tester/builder//BIND10/20130129033301-NetBSD4-i386-GCC/logs/unittests.out.
with self._lock:
+ # MockMsgq. We need to wait (blocking) for it, otherwise it'll wipe out
+ # a socket for another test during its shutdown.
self.msgq.shutdown(True)
# We also wait for the others, but these are just so we don't create
diff --git a/src/lib/python/isc/statistics/tests/counters_test.py b/src/lib/python/isc/statistics/tests/counters_test.py
index 550fd1f..2d791c4 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,
More information about the bind10-changes
mailing list