mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
Add support for "broken" Twisted-style tests.
Some tests leak resources. Clean up after them.
This commit is contained in:
parent
4de7077689
commit
925a3aed7b
@ -12,8 +12,9 @@ from testtools import (
|
|||||||
TestCase,
|
TestCase,
|
||||||
)
|
)
|
||||||
from testtools.twistedsupport import (
|
from testtools.twistedsupport import (
|
||||||
AsynchronousDeferredRunTest,
|
|
||||||
SynchronousDeferredRunTest,
|
SynchronousDeferredRunTest,
|
||||||
|
AsynchronousDeferredRunTest,
|
||||||
|
AsynchronousDeferredRunTestForBrokenTwisted,
|
||||||
)
|
)
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
@ -892,3 +893,16 @@ class AsyncTestCase(_TestCaseMixin, TestCase):
|
|||||||
AsynchronousDeferredRunTest.make_factory(timeout=60.0),
|
AsynchronousDeferredRunTest.make_factory(timeout=60.0),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class AsyncBrokenTestCase(_TestCaseMixin, TestCase):
|
||||||
|
"""
|
||||||
|
A ``TestCase`` like ``AsyncTestCase`` but which spins the reactor a little
|
||||||
|
longer than apparently necessary to clean out lingering unaccounted for
|
||||||
|
event sources.
|
||||||
|
|
||||||
|
Tests which require this behavior are broken and should be fixed so they
|
||||||
|
pass with ``AsyncTestCase``.
|
||||||
|
"""
|
||||||
|
run_tests_with = EliotLoggedRunTest.make_factory(
|
||||||
|
AsynchronousDeferredRunTestForBrokenTwisted.make_factory(timeout=60.0),
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user