launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25721
[Merge] ~cjwatson/launchpad:remove-unused-layers into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:remove-unused-layers into launchpad:master.
Commit message:
Remove TwistedLaunchpadZopelessLayer and TwistedAppServerLayer
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/394388
They had no remaining users.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:remove-unused-layers into launchpad:master.
diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py
index 8c9241c..9089c60 100644
--- a/lib/lp/testing/layers.py
+++ b/lib/lp/testing/layers.py
@@ -39,8 +39,6 @@ __all__ = [
'LibrarianLayer',
'PageTestLayer',
'RabbitMQLayer',
- 'TwistedAppServerLayer',
- 'TwistedLaunchpadZopelessLayer',
'TwistedLayer',
'YUITestLayer',
'YUIAppServerLayer',
@@ -1698,53 +1696,6 @@ class PageTestLayer(LaunchpadFunctionalLayer, BingServiceLayer):
pass
-class TwistedLaunchpadZopelessLayer(TwistedLayer, LaunchpadZopelessLayer):
- """A layer for cleaning up the Twisted thread pool."""
-
- @classmethod
- @profiled
- def setUp(cls):
- pass
-
- @classmethod
- @profiled
- def tearDown(cls):
- pass
-
- @classmethod
- @profiled
- def testSetUp(cls):
- pass
-
- @classmethod
- @profiled
- def testTearDown(cls):
- # XXX 2008-06-11 jamesh bug=239086:
- # Due to bugs in the transaction module's thread local
- # storage, transactions may be reused by new threads in future
- # tests. Therefore we do some cleanup before the pool is
- # destroyed by TwistedLayer.testTearDown().
- from twisted.internet import interfaces, reactor
- if interfaces.IReactorThreads.providedBy(reactor):
- pool = getattr(reactor, 'threadpool', None)
- if pool is not None and pool.workers > 0:
-
- def cleanup_thread_stores(event):
- disconnect_stores()
- # Don't exit until the event fires. This ensures
- # that our thread doesn't get added to
- # pool.waiters until all threads are processed.
- event.wait()
-
- event = threading.Event()
- # Ensure that the pool doesn't grow, and issue one
- # cleanup job for each thread in the pool.
- pool.adjustPoolsize(0, pool.workers)
- for i in range(pool.workers):
- pool.callInThread(cleanup_thread_stores, event)
- event.set()
-
-
class LayerProcessController:
"""Controller for starting and stopping subprocesses.
@@ -2011,31 +1962,6 @@ class ZopelessAppServerLayer(LaunchpadZopelessLayer):
LayerProcessController.postTestInvariants()
-class TwistedAppServerLayer(TwistedLaunchpadZopelessLayer):
- """Layer for twisted-using zopeless tests that need a running app server.
- """
-
- @classmethod
- @profiled
- def setUp(cls):
- LayerProcessController.setUp()
-
- @classmethod
- @profiled
- def tearDown(cls):
- LayerProcessController.stopAppServer()
-
- @classmethod
- @profiled
- def testSetUp(cls):
- LaunchpadLayer.resetSessionDb()
-
- @classmethod
- @profiled
- def testTearDown(cls):
- LayerProcessController.postTestInvariants()
-
-
class YUITestLayer(FunctionalLayer):
"""The layer for all YUITests cases."""