diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/docs/membership.txt | 2 | ||||
| -rw-r--r-- | src/mailman/docs/registration.txt | 1 | ||||
| -rw-r--r-- | src/mailman/testing/helpers.py | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/mailman/docs/membership.txt b/src/mailman/docs/membership.txt index 65f5b37ed..fce7a3f8a 100644 --- a/src/mailman/docs/membership.txt +++ b/src/mailman/docs/membership.txt @@ -14,7 +14,7 @@ store mailing list data in a different database than user data. When we create a mailing list, it starts out with no members... - >>> mlist = config.db.list_manager.create(u'_xtest@example.com') + >>> mlist = create_list(u'_xtest@example.com') >>> mlist <mailing list "_xtest@example.com" at ...> >>> sorted(member.address.address for member in mlist.members.members) diff --git a/src/mailman/docs/registration.txt b/src/mailman/docs/registration.txt index 5f9e0b7fd..c1b29fd05 100644 --- a/src/mailman/docs/registration.txt +++ b/src/mailman/docs/registration.txt @@ -337,7 +337,6 @@ Registration and subscription Fred registers with Mailman at the same time that he subscribes to a mailing list. - >>> from mailman.app.lifecycle import create_list >>> mlist = create_list(u'alpha@example.com') >>> token = registrar.register( ... u'fred.person@example.com', 'Fred Person', mlist) diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index 10f5229d7..41d95602f 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -36,6 +36,7 @@ import signal import socket import logging import smtplib +import datetime import threading from Queue import Empty, Queue @@ -46,6 +47,7 @@ from mailman.testing.smtplistener import Server from mailman.utilities.mailbox import Mailbox +STARTUP_WAIT = datetime.timedelta(seconds=5) log = logging.getLogger('mailman.debug') @@ -239,7 +241,8 @@ def get_lmtp_client(): # It's possible the process has started but is not yet accepting # connections. Wait a little while. lmtp = LMTP() - for attempts in range(3): + until = datetime.datetime.now() + STARTUP_WAIT + while datetime.datetime.now() < until: try: response = lmtp.connect( config.mta.lmtp_host, int(config.mta.lmtp_port)) @@ -247,7 +250,7 @@ def get_lmtp_client(): return lmtp except socket.error, error: if error[0] == errno.ECONNREFUSED: - time.sleep(1) + time.sleep(0.5) else: raise else: |
