Opened 11 years ago

Last modified 11 years ago

#342 defect closed fixed (fixed)

intermittent test_mail process failure[PATCH]

Reported by: warner Owned by:
Priority: high Milestone:
Component: Keywords:
Cc: spiv, warner Branch:
Author: Launchpad Bug:

Description


Change History (7)

comment:1 Changed 11 years ago by warner

I've seen this happen twice in the full-2.3 builder.
I suspect it is related to #337 (test_process error).

ERROR: testProcessAlias (twisted.test.test_mail.ProcessAliasTestCase)
-------------------------------------------------------------------------------
"/home/buildbot/BuildBot/slave/full2.3/Twisted/twisted/test/test_mail.py", line
1029, in testProcessAlias
    unittest.deferredResult(m.eomReceived())
  File "/home/buildbot/BuildBot/slave/full2.3/Twisted/twisted/trial/util.py",
line 72, in deferredResult
    raise result
Failure: [Failure instance: Traceback: twisted.internet.defer.TimeoutError,
Callback timed out
]

comment:2 Changed 11 years ago by spiv

Here's another failure for the same test, from the freebsd slave:

===============================================================================
FAILURE: testCyclicAlias (twisted.test.test_mail.ProcessAliasTestCase)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/slave/twisted/bsd-full2.2/Twisted/twisted/trial/unittest.py", line
246, in _runPhase
    stage(*args, **kwargs)
  File "/home/slave/twisted/bsd-full2.2/Twisted/twisted/trial/util.py", line 43,
in reactorCleanUp
    raise unittest.FailTest, msg
FailTest: 
pendingTimedCalls still pending:
 <DelayedCall 145373580 [-0.00216996669769s] called=0 cancelled=0 <code object
reapAllProcesses at 0x83b06a0, file
"/home/slave/twisted/bsd-full2.2/Twisted/twisted/internet/process.py", line 64>()>

-------------------------------------------------------------------------------

comment:3 Changed 11 years ago by moshez

My guess is that the reactor doesn't have time to clean up after itself.
Here's a patch which should fix the problem:

Index: twisted/test/test_mail.py
===================================================================
RCS file: /cvs/Twisted/twisted/test/test_mail.py,v
retrieving revision 1.33
diff -u -r1.33 test_mail.py
--- twisted/test/test_mail.py   9 Oct 2003 17:32:28 -0000       1.33
+++ twisted/test/test_mail.py   21 Oct 2003 06:29:43 -0000
@@ -1099,6 +1099,7 @@
             mail.alias.MessageWrapper(p, 'echo')
         ])
         self.assertEquals(r, expected)
+        reactor.iterate(1)
 if not components.implements(reactor, interfaces.IReactorProcess):
     ProcessAliasTestCase = "IReactorProcess not supported"

comment:4 Changed 11 years ago by itamarst

I tried the solution, lets see if it helps.

comment:5 Changed 11 years ago by moshez

It seems this problem (and 337) were fixed.
Let's give it a couple more tests, and close it.

comment:6 Changed 11 years ago by moshez

This bug, and 337, seem gone.
Please open new issues for intermittent failures if they show
up again.
Thanks

comment:7 Changed 4 years ago by <automation>

Note: See TracTickets for help on using tickets.