Merge lp:~frankban/launchpad/bug-974585-unclean-reactor-error into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Benji York on 2012-04-18 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15124 |
| Proposed branch: | lp:~frankban/launchpad/bug-974585-unclean-reactor-error |
| Merge into: | lp:launchpad |
| Diff against target: |
271 lines (+51/-11) 3 files modified
lib/lp/buildmaster/tests/test_builder.py (+40/-3) lib/lp/registry/tests/test_distributionmirror_prober.py (+1/-8) lib/lp/testing/__init__.py (+10/-0) |
| To merge this branch: | bzr merge lp:~frankban/launchpad/bug-974585-unclean-reactor-error |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Benji York (community) | code | 2012-04-18 | Approve on 2012-04-18 |
|
Review via email:
|
|||
Description of the Change
= Summary =
Some tests using twisted leave delayed calls. If, later, another test uses
testtools an exception is raised if the reactor is not clean.
== Proposed fix ==
Use the clean_up_reactor function on the tearDown of tests leaving delayed
calls.
== Pre-implementation notes ==
I started a full test run temporary patching zope.testrunner to check and
notify not cancelled delayed calls after each test.
This way I spotted lp.buildmaster.
== Implementation details ==
- Move the `clean_up_reactor` function in a more generic place.
- And use it in
lp.buildmaste
- Lint updates for file `lib/lp/
== Demo and Q/A ==
no-qa
== lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/

Looks good. Your technique for finding offending tests was smart.