BIND 10 trac1175_reapplied, updated. 474c0b02bb1d978fbb169aa9d0121c873019e31d [1175] remove the retrying part because there is no clear necessity

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Sep 28 04:52:40 UTC 2011


The branch, trac1175_reapplied has been updated
       via  474c0b02bb1d978fbb169aa9d0121c873019e31d (commit)
       via  f9142f0bcd6faff5def205263ff91ce28d5dbe79 (commit)
      from  cef9bd05810891bb4d0b44f0dc3ad47ee8161784 (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 474c0b02bb1d978fbb169aa9d0121c873019e31d
Author: Naoki Kambe <kambe at jprs.co.jp>
Date:   Wed Sep 28 13:53:21 2011 +0900

    [1175] remove the retrying part because there is no clear necessity

commit f9142f0bcd6faff5def205263ff91ce28d5dbe79
Author: Naoki Kambe <kambe at jprs.co.jp>
Date:   Wed Sep 28 13:45:49 2011 +0900

    [1175] comment the reason why socket.has_ipv6 is not used

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

Summary of changes:
 src/bin/stats/tests/b10-stats-httpd_test.py |    5 ++++-
 src/bin/stats/tests/test_utils.py           |   16 +---------------
 2 files changed, 5 insertions(+), 16 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py
index 22b91c1..e867080 100644
--- a/src/bin/stats/tests/b10-stats-httpd_test.py
+++ b/src/bin/stats/tests/b10-stats-httpd_test.py
@@ -84,7 +84,10 @@ def get_availaddr(address='127.0.0.1', port=8001):
 def is_ipv6_enabled(address='::1', port=8001):
     """checks IPv6 enabled on the platform. address for check is '::1'
     and port for check is random number between 8001 and
-    65535. Retrying is 3 times even if it fails."""
+    65535. Retrying is 3 times even if it fails. The built-in socket
+    module provides a 'has_ipv6' parameter, but it's not used here
+    because there may be a situation where the value is True on an
+    environment where the IPv6 config is disabled."""
     for p in random.sample(range(port, 65535), 3):
         try:
             sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index 3cd394f..da0bac4 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -65,21 +65,7 @@ def send_shutdown(module_name, **kwargs):
 
 class ThreadingServerManager:
     def __init__(self, server, *args, **kwargs):
-        self.server = None
-        # retrying to create a server object until 3 times because a
-        # SessionTimeout depending on some environment or timing may
-        # be accidentally raised
-        n = 0
-        while True:
-            try:
-                self.server = server(*args, **kwargs)
-            except isc.cc.session.SessionTimeout:
-                if self.server is not None:
-                    self.server.shutdown()
-                if n >2: raise
-                n = n + 1
-                continue
-            else: break
+        self.server = server(*args, **kwargs)
         self.server_name = server.__name__
         self.server._thread = threading.Thread(
             name=self.server_name, target=self.server.run)




More information about the bind10-changes mailing list