BIND 10 trac2136, updated. c46ccb258d6d2ba5d42f5e672450bfbe69a9fd27 [2136] Fixed unfinished MockAuth objects

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Jul 27 01:33:28 UTC 2012


The branch, trac2136 has been updated
       via  c46ccb258d6d2ba5d42f5e672450bfbe69a9fd27 (commit)
      from  7e6d71c5e0a5be43e3d236ffda036d26708ed50a (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 c46ccb258d6d2ba5d42f5e672450bfbe69a9fd27
Author: Naoki Kambe <kambe at jprs.co.jp>
Date:   Fri Jul 27 10:16:51 2012 +0900

    [2136] Fixed unfinished MockAuth objects
    
    The extra MockAuth objects didn't shut down in
    BaseModules.shutdown(). But these weren't needed for unittest of stats
    httpd. So setting up and shutting up of them were moved to
    b10-stats_test.py from test_utils.py.

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

Summary of changes:
 src/bin/stats/tests/b10-stats_test.py |   10 +++++++++-
 src/bin/stats/tests/test_utils.py     |    8 +++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/stats/tests/b10-stats_test.py b/src/bin/stats/tests/b10-stats_test.py
index 68cf480..bb82069 100644
--- a/src/bin/stats/tests/b10-stats_test.py
+++ b/src/bin/stats/tests/b10-stats_test.py
@@ -30,7 +30,7 @@ import imp
 
 import stats
 import isc.cc.session
-from test_utils import BaseModules, ThreadingServerManager, MyStats, SignalHandler, send_command, send_shutdown
+from test_utils import BaseModules, ThreadingServerManager, MyStats, SignalHandler, send_command, send_shutdown, MockAuth
 from isc.testutils.ccsession_mock import MockModuleCCSession
 
 class TestUtilties(unittest.TestCase):
@@ -150,11 +150,19 @@ class TestStats(unittest.TestCase):
         # set the signal handler for deadlock
         self.sig_handler = SignalHandler(self.fail)
         self.base = BaseModules()
+        # invoke more three MockAuth
+        for i in ['2', '3', '4']:
+            setattr(self.base, "auth"+i, \
+                        ThreadingServerManager(MockAuth))
+            getattr(self.base, "auth"+i).run()
         self.const_timestamp = 1308730448.965706
         self.const_datetime = '2011-06-22T08:14:08Z'
         self.const_default_datetime = '1970-01-01T00:00:00Z'
 
     def tearDown(self):
+        # shutdown more three MockAuth
+        for i in ['2', '3', '4']:
+            getattr(self.base, "auth"+i).shutdown()
         self.base.shutdown()
         # reset the signal handler
         self.sig_handler.reset()
diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index fcb7fc4..7d3f539 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -474,11 +474,9 @@ class BaseModules:
         # MockBoss
         self.boss = ThreadingServerManager(MockBoss)
         self.boss.run()
-        # MockAuth * 4
-        for i in ['', '2', '3', '4']:
-            setattr(self,"auth"+i, \
-                        ThreadingServerManager(MockAuth))
-            getattr(self, "auth"+i).run()
+        # MockAuth
+        self.auth = ThreadingServerManager(MockAuth)
+        self.auth.run()
 
     def shutdown(self):
         # MockAuth



More information about the bind10-changes mailing list