get rid of 'test left new threads behind' messages during 'make check'

Bug #78605 reported by Elliot Murphy
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

This seems to be an error reported by Zope.

sourcecode/zope/src/zope/testing/testrunner.py has this code:
# Did the test leave any new threads behind?
        new_threads = [t for t in threading.enumerate()
                         if (t.isAlive()
                             and
                             t not in self._threads)]
        if new_threads:
            print "The following test left new threads behind:"
            print test
            print "New thread(s):", new_threads

sourcecode/zope/src/ZEO/tests/ConnectionTests.py has this code:
 # Get rid of the 'test left new threads behind' warning
        time.sleep(0.1)

yuck!

While running 'make check' on a multiprocessor machine, I get plenty of these messages about test leaving threads behind. Here is an example:
The following test left new threads behind:
 test_probe_sets_up_timeout_call (canonical.launchpad.scripts.ftests.test_distributionmirror_prober.TestProberProtocol)
 New thread(s): [<Thread(PoolThread-46912704483056-1, started)>]
     test_redirectawareprober_detects_infinite_loop (canonical.launchpad.scripts.ftests.test_distributionmirror_prober.TestProberProtocol)

It would be good to clean these up (without resorting to sleep calls).

Gary Poster (gary)
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Robert Collins (lifeless) wrote :

paste has a facility to kill threads, could grab that and use it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.