summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py26
1 files changed, 10 insertions, 16 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index c47ad4a..3b135b8 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -869,16 +869,13 @@ class TestSMTPServer(smtpd.SMTPServer):
"""
asyncore.loop(poll_interval, map=self._map)
- def stop(self, timeout=None):
+ def stop(self):
"""
Stop the thread by closing the server instance.
Wait for the server thread to terminate.
-
- :param timeout: How long to wait for the server thread
- to terminate.
"""
self.close()
- support.join_thread(self._thread, timeout)
+ support.join_thread(self._thread)
self._thread = None
asyncore.close_all(map=self._map, ignore_all=True)
@@ -922,16 +919,13 @@ class ControlMixin(object):
self.ready.set()
super(ControlMixin, self).serve_forever(poll_interval)
- def stop(self, timeout=None):
+ def stop(self):
"""
Tell the server thread to stop, and wait for it to do so.
-
- :param timeout: How long to wait for the server thread
- to terminate.
"""
self.shutdown()
if self._thread is not None:
- support.join_thread(self._thread, timeout)
+ support.join_thread(self._thread)
self._thread = None
self.server_close()
self.ready.clear()
@@ -1699,7 +1693,7 @@ class SocketHandlerTest(BaseTest):
self.root_logger.removeHandler(self.sock_hdlr)
self.sock_hdlr.close()
if self.server:
- self.server.stop(2.0)
+ self.server.stop()
finally:
BaseTest.tearDown(self)
@@ -1736,7 +1730,7 @@ class SocketHandlerTest(BaseTest):
# one-second timeout on socket.create_connection() (issue #16264).
self.sock_hdlr.retryStart = 2.5
# Kill the server
- self.server.stop(2.0)
+ self.server.stop()
# The logging call should try to connect, which should fail
try:
raise RuntimeError('Deliberate mistake')
@@ -1810,7 +1804,7 @@ class DatagramHandlerTest(BaseTest):
"""Shutdown the UDP server."""
try:
if self.server:
- self.server.stop(2.0)
+ self.server.stop()
if self.sock_hdlr:
self.root_logger.removeHandler(self.sock_hdlr)
self.sock_hdlr.close()
@@ -1891,7 +1885,7 @@ class SysLogHandlerTest(BaseTest):
"""Shutdown the server."""
try:
if self.server:
- self.server.stop(2.0)
+ self.server.stop()
if self.sl_hdlr:
self.root_logger.removeHandler(self.sl_hdlr)
self.sl_hdlr.close()
@@ -2028,7 +2022,7 @@ class HTTPHandlerTest(BaseTest):
self.assertEqual(d['funcName'], ['test_output'])
self.assertEqual(d['msg'], [msg])
- self.server.stop(2.0)
+ self.server.stop()
self.root_logger.removeHandler(self.h_hdlr)
self.h_hdlr.close()
@@ -3228,7 +3222,7 @@ class ConfigDictTest(BaseTest):
finally:
t.ready.wait(2.0)
logging.config.stopListening()
- support.join_thread(t, 2.0)
+ support.join_thread(t)
def test_listen_config_10_ok(self):
with support.captured_stdout() as output: