Merge lp:~free.ekanayaka/txlongpoll/fast-rabbit-reset into lp:txlongpoll
| Status: | Merged |
|---|---|
| Merged at revision: | 90 |
| Proposed branch: | lp:~free.ekanayaka/txlongpoll/fast-rabbit-reset |
| Merge into: | lp:txlongpoll |
| Diff against target: |
145 lines (+51/-15) 6 files modified
.testr.conf (+1/-2) README (+1/-1) buildout.cfg (+6/-0) txlongpoll/testing/client.py (+25/-10) txlongpoll/tests/__init__.py (+13/-0) txlongpoll/tests/test_frontend.py (+5/-2) |
| To merge this branch: | bzr merge lp:~free.ekanayaka/txlongpoll/fast-rabbit-reset |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | 2015-11-23 | Needs Fixing on 2016-05-25 |
| Robert Collins (community) | Needs Fixing on 2016-05-24 | ||
|
Review via email:
|
|||
Description of the Change
This branch adds a few improvements to the test suite:
- Take advantage of testresources.
- Silence the Twisted logger in FrontEndAjaxTes
- Remove the workaround of aborting tearDown early without running any asynchronous logic (see the comment in the code).
- Point buildout to bson 0.4.3 since the default (1.1.1) is not compatible
with Python 2.
- 90. By Free Ekanayaka on 2016-05-24
-
Add custom test program
- 91. By Free Ekanayaka on 2016-05-24
-
Revert spurious changes
- 92. By Free Ekanayaka on 2016-05-24
-
Use load_tests protocol
- 93. By Free Ekanayaka on 2016-05-24
-
Fix buildout versions
| Free Ekanayaka (free.ekanayaka) wrote : | # |
> The whole custom runner is not needed, is it? Why is it there. Surely a
> load_tests hook is much cleaner.
Nice, didn't know about it. Fixed as suggested.
| William Grant (wgrant) wrote : | # |
The new load_tests doesn't seem to work as intended (on at least precise and xenial). If I break at the end and inspect result:
(Pdb) p result
<testresources.
It's an OptimisingTestSuite wrapping a whole lot of normal TestSuites, so the fixture is restarted for each test, and the newly un-neutered tearDown fails.
Overriding loader.suiteClass works, but I wonder if there is a better way.
- 94. By Free Ekanayaka on 2016-05-25
-
Fix testr configuration
| William Grant (wgrant) wrote : | # |
As discussed on IRC, the problem was my old version of testresources. Newer versions of OptimisingTestSuite flatten nested test suites, fixing the problem.

The whole custom runner is not needed, is it? Why is it there. Surely a load_tests hook is much cleaner.