test_spinner.TestRunInReactor.test_clean_running_threads fails with an extra thread
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Fix Released
|
Critical
|
Robert Collins |
Bug Description
=======
FAIL: testtools.
-------
Text attachment: traceback
------------
Traceback (most recent call last):
File "C:\bzr\
return fn(*args)
File "C:\bzr\
return self._get_
File "C:\bzr\
self.
File "C:\bzr\
self.
AssertionError: Match failed. Matchee: "[<_MainThread(
Matcher: Equals(
Difference: !=:
reference = [<_MainThread(
actual = [<_MainThread(
<Thread(
This may be related to my OS, my Python version (2.4) or my twisted version (8.1.0).
Related branches
Changed in testtools: | |
status: | Fix Committed → In Progress |
Changed in testtools: | |
status: | In Progress → Fix Committed |
Changed in testtools: | |
status: | Fix Committed → Fix Released |
Thanks for the report. The test looks to be passing on Hudson, so I think we can rule out Python 2.4.
* Do you get the failure reliably, or does it only happen from time to time?
* Could you please try with latest trunk and see if you still get the failure?
* If trunk still fails, could you please try this patch:
=== modified file 'testtools/ tests/test_ spinner. py' tests/test_ spinner. py 2010-10-26 10:42:59 +0000 tests/test_ spinner. py 2010-10-31 17:32:33 +0000 r(TestCase) : spinner( reactor) run(timeout, reactor. callInThread, time.sleep, timeout / 2.0) callInThread, time.sleep, timeout)
self. assertThat( list(threading. enumerate( )), Equals( current_ threads) )
--- testtools/
+++ testtools/
@@ -237,7 +237,7 @@ class TestRunInReacto
reactor = self.make_reactor()
timeout = self.make_timeout()
spinner = self.make_
- spinner.
+ spinner.run(timeout * 10, reactor.
def test_leftover_ junk_available( self):