[tahoe-lafs-trac-stream] [tahoe-lafs] #1852: test suite: find a way to prevent unclean reactor errors causing subsequent test failures

tahoe-lafs trac at tahoe-lafs.org
Thu Nov 22 23:57:03 UTC 2012


#1852: test suite: find a way to prevent unclean reactor errors causing subsequent
test failures
-------------------------+-------------------------------------------------
     Reporter:           |      Owner:  davidsarah
  davidsarah             |     Status:  new
         Type:  defect   |  Milestone:  undecided
     Priority:  normal   |    Version:  1.9.2
    Component:  code     |   Keywords:  test twisted-trial unclean reactor
   Resolution:           |  timeout hang
Launchpad Bug:           |
-------------------------+-------------------------------------------------

Comment (by davidsarah):

 Replying to [comment:7 davidsarah]:
 > I'll see whether {{{reactor.getDelatedCalls}}} can be used to replace
 the use of internal attributes of {{{reactor}}} in
 {{{WaitForDelayedCalls}}}.

 It can; in fact
 [http://twistedmatrix.com/trac/browser/tags/releases/twisted-10.2.0/twisted/internet/base.py#L725
 its implementation] does exactly the right thing:
 {{{
 def getDelayedCalls(self):
     """Return all the outstanding delayed calls in the system.
     They are returned in no particular order.
     This method is not efficient -- it is really only meant for
     test cases."""
     return [x for x in (self._pendingTimedCalls + self._newTimedCalls) if
 not x.cancelled]
 }}}

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1852#comment:8>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list