BIND 10 trac1927, updated. 0239399581611def5ec0029ff48babb818cc7eb8 [1927] Remove leftover debug command

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 13 14:35:52 UTC 2013


The branch, trac1927 has been updated
       via  0239399581611def5ec0029ff48babb818cc7eb8 (commit)
       via  416bae7d607e43d00b3661a201c3162bfe7e8270 (commit)
      from  c8b7d82c25958cdae8bb02e3a93b2b8d6dd078d1 (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 0239399581611def5ec0029ff48babb818cc7eb8
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Mar 13 15:34:51 2013 +0100

    [1927] Remove leftover debug command
    
    Don't put the resetUnitTestRootLogger in production program. This was
    just a leftover from some debugging.

commit 416bae7d607e43d00b3661a201c3162bfe7e8270
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Mar 13 15:33:22 2013 +0100

    [1927] Use barrier instead of sleep
    
    It should be more reliable to ensure all messages arrived.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/msgq/msgq.py.in             |    1 -
 src/bin/msgq/tests/msgq_run_test.py |   10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in
index f1f20eb..6435c92 100755
--- a/src/bin/msgq/msgq.py.in
+++ b/src/bin/msgq/msgq.py.in
@@ -42,7 +42,6 @@ import isc.cc
 isc.util.process.rename()
 
 isc.log.init("b10-msgq", buffer=True)
-isc.log.resetUnitTestRootLogger()
 # Logger that is used in the actual msgq handling - startup, shutdown and the
 # poller thread.
 logger = isc.log.Logger("msgq")
diff --git a/src/bin/msgq/tests/msgq_run_test.py b/src/bin/msgq/tests/msgq_run_test.py
index 2721daf..33e80bc 100644
--- a/src/bin/msgq/tests/msgq_run_test.py
+++ b/src/bin/msgq/tests/msgq_run_test.py
@@ -235,11 +235,11 @@ class MsgqRunTest(unittest.TestCase):
             self.assertTrue(lname in lnames)
             lnames.remove(lname)
 
-        # Wait a short time, so messages sent where they don't belong get some
-        # time to arrive. They could still be late, so the test could still
-        # pass on a slow machine, but an unreliable test is better than none
-        # at all. Any idea how to do it in a better way?
-        time.sleep(0.1)
+        # The barrier makes the msgq process everything we sent. As the
+        # processing is single-threaded in it, any stray message would have
+        # arrived before the barrier ends.
+        self.__barrier(conn_b)
+        self.__barrier([conn_a])
         for c in conn_b:
             self.assertEqual((None, None), c.group_recvmsg())
         self.assertEqual((None, None), conn_a.group_recvmsg())



More information about the bind10-changes mailing list