Merge lp:~jml/testtools/trial-hang into lp:~testtools-committers/testtools/trunk
Proposed by
Jonathan Lange
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 241 | ||||
Proposed branch: | lp:~jml/testtools/trial-hang | ||||
Merge into: | lp:~testtools-committers/testtools/trunk | ||||
Diff against target: |
43 lines (+14/-1) 2 files modified
testtools/deferredruntest.py (+1/-1) testtools/tests/test_deferredruntest.py (+13/-0) |
||||
To merge this branch: | bzr merge lp:~jml/testtools/trial-hang | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
testtools committers | Pending | ||
Review via email: mp+91470@code.launchpad.net |
Description of the change
Turns out that running testtools Twisted tests can cause hangs in Trial. That really sucks.
Looking into it, it was caused by a logic bug in run_with_
However, 'real_observers' was just a reference to the maintained list of current observers. That meant that when we added a log observer, the list of real_observers expanded, which made the 'for observer in real_observers' loop keep expanding.
The fix is very simple, as is the test.
To post a comment you must log in.
+1