summaryrefslogtreecommitdiff
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-15 12:02:08 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-15 12:02:08 +0000
commit82b0210a72a26d596a02368c3044b16e846727a1 (patch)
tree66aacdb0ef4d0fd07b66407a168a37eab732eeef /Lib/test/test_logging.py
parent22d1d5acc17a0b8039db9da9129bade24903ef0f (diff)
downloadcpython-82b0210a72a26d596a02368c3044b16e846727a1.tar.gz
Fixes #14314: Improved SMTP timeout handling.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index be84be682f..b0f8f9fb16 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -936,8 +936,9 @@ class SMTPHandlerTest(BaseTest):
r = logging.makeLogRecord({'msg': 'Hello'})
self.handled = threading.Event()
h.handle(r)
- self.handled.wait()
+ self.handled.wait(5.0) # 14314: don't wait forever
server.stop()
+ self.assertTrue(self.handled.is_set())
self.assertEqual(len(self.messages), 1)
peer, mailfrom, rcpttos, data = self.messages[0]
self.assertEqual(mailfrom, 'me')