Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3701 closed defect (duplicate)

Unit tests for notification seems caught in endless loop

Reported by: Manuzhai Owned by: Jonas Borgström
Priority: low Milestone:
Component: general Version: 0.10b1
Severity: minor Keywords:
Cc: manuzhai@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm working on a community buildbot testing Trac against Python trunk and Python 2.5. As part of this, I'm first checking to see if the unit tests succeed against Python 2.4 (so that any failures turning up in the buildbot aren't false positives).

I have a problem where trac/ticket/tests/notification.py is taking a LONG time to complete. Specifically, the problem is in run_bcc_feature(True) in test_bcc_privacy(), as can be seen from this traceback I get when interrupting the tests:

Traceback (most recent call last):
  File "trac/ticket/tests/notification.py", line 543, in ?
    unittest.TextTestRunner(verbosity=2).run(suite())
  File "/usr/lib/python2.4/unittest.py", line 696, in run
    test(result)
  File "/usr/lib/python2.4/unittest.py", line 428, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.4/unittest.py", line 424, in run
    test(result)
  File "/usr/lib/python2.4/unittest.py", line 428, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.4/unittest.py", line 424, in run
    test(result)
  File "/usr/lib/python2.4/unittest.py", line 281, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.4/unittest.py", line 260, in run
    testMethod()
  File "trac/ticket/tests/notification.py", line 222, in test_bcc_privacy
    run_bcc_feature(True)
  File "trac/ticket/tests/notification.py", line 187, in run_bcc_feature
    tn.notify(ticket, newticket=True)
  File "/home/manuzhai/src/trac/trac/ticket/notification.py", line 127, in notify
    NotifyEmail.notify(self, ticket.id, subject)
  File "/home/manuzhai/src/trac/trac/notification.py", line 208, in notify
    Notify.notify(self, resid)
  File "/home/manuzhai/src/trac/trac/notification.py", line 106, in notify
    self.begin_send()
  File "/home/manuzhai/src/trac/trac/notification.py", line 271, in begin_send
    self.server = smtplib.SMTP(self.smtp_server, self.smtp_port)
  File "/usr/lib/python2.4/smtplib.py", line 244, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.4/smtplib.py", line 297, in connect
    self.sock.connect(sa)
  File "<string>", line 1, in connect
KeyboardInterrupt

I hope this can be fixed.

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 18 years ago

Resolution: duplicate
Status: newclosed

This is simply another symptom of the setup in your global trac.ini file disrupting the unit-tests.

See #3700.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.