Lingering HTTP Channel in web2 when testing with trial
Hi
I have an application which uses web2. In good twisted style I'm writing
tests for it, and using trial.
When performing some rather simple page retrievals a get a lingering http
channel. Setting
twisted.internet.base.DelayedCall.debug = True
I get this trace:
File "/usr/lib/python2.4/site-packages/twisted/trial/util.py", line 131,
in _dispatch
getattr(self, "do_%s" % attr)()
File "/usr/lib/python2.4/site-packages/twisted/trial/util.py", line 173,
in do_cleanPending
raise PendingTimedCallsError(s)
twisted.trial.util.PendingTimedCallsError: pendingTimedCalls still pending
(consider setting twisted.internet.base.DelayedCall.debug = True):
This if course makes sense, especially if the server lost its connection. I
am doing cleanup in tearDown (calling stopListening() on the port), but
trial still complains. Canceling the call, and calling it manually in
tearDown, doesn't appear to help either. How do I make it shut it up in a
proper way?
PS. I'm rather pleased with the web2 framework, especially the stream
framework (once I got my head wrapped around it), but it is hard to get an
overview of the internals. A brief description of the design, philosophy,
what was wrong with web(1), etc. would be very nice (I do realize that web2
is a moving target).
--
- Henrik
participants (1)
-
Henrik Thostrup Jensen