summaryrefslogtreecommitdiff
path: root/Mailman/testing/emailbase.py
diff options
context:
space:
mode:
authorbwarsaw2007-01-18 06:29:42 +0000
committerbwarsaw2007-01-18 06:29:42 +0000
commit372d4c2fdf072f6bfedca5fc84a2d5bb427418e6 (patch)
tree594db647158d8156f51ea6d05aba093f29ae061e /Mailman/testing/emailbase.py
parent1e63bc4a3b6d9197e66f57e11f4b6733a3b324dd (diff)
downloadmailman-372d4c2fdf072f6bfedca5fc84a2d5bb427418e6.tar.gz
mailman-372d4c2fdf072f6bfedca5fc84a2d5bb427418e6.tar.zst
mailman-372d4c2fdf072f6bfedca5fc84a2d5bb427418e6.zip
Diffstat (limited to 'Mailman/testing/emailbase.py')
-rw-r--r--Mailman/testing/emailbase.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Mailman/testing/emailbase.py b/Mailman/testing/emailbase.py
index 3421efb4b..e033195de 100644
--- a/Mailman/testing/emailbase.py
+++ b/Mailman/testing/emailbase.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -56,6 +56,10 @@ class EmailBase(TestBase):
TestBase._configure(self, fp)
print >> fp, 'SMTPPORT =', TESTPORT
config.SMTPPORT = TESTPORT
+ # Don't go nuts on mailmanctl restarts. If a qrunner fails once, it
+ # will keep failing.
+ print >> fp, 'MAX_RESTARTS = 1'
+ config.MAX_RESTARTS = 1
def setUp(self):
TestBase.setUp(self)
@@ -86,7 +90,7 @@ class EmailBase(TestBase):
time.sleep(3)
except socket.error, e:
# IWBNI e had an errno attribute
- if e[0] == errno.ECONNREFUSED:
+ if e[0] in (errno.ECONNREFUSED, errno.ETIMEDOUT):
break
else:
raise
@@ -105,6 +109,7 @@ class EmailBase(TestBase):
MSGTEXT = None
except asyncore.ExitNow:
pass
+ asyncore.close_all()
return MSGTEXT
finally:
self._mlist.Lock()