diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-03-15 12:02:08 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-03-15 12:02:08 (GMT) |
commit | 17160fd6d6d7850294a9a465a3e5e399e5028bb6 (patch) | |
tree | 0ba75e61d7a0e93d7b7a86e9e66da834462a20ef /Lib/test/test_logging.py | |
parent | 7cc7033cb428ad74366f93e8ebcb4bb74f3f6511 (diff) | |
download | cpython-17160fd6d6d7850294a9a465a3e5e399e5028bb6.zip cpython-17160fd6d6d7850294a9a465a3e5e399e5028bb6.tar.gz cpython-17160fd6d6d7850294a9a465a3e5e399e5028bb6.tar.bz2 |
Fixes #14314: Improved SMTP timeout handling.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index be84be6..b0f8f9f 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') |