l.t.l.LayerProcessController : class documentation

Part of lp.testing.layers View In Hierarchy

Controller for starting and stopping subprocesses.

Layers which need to start and stop a child process appserver or smtp server should call the methods in this class, but should NOT inherit from this class.

Class Method setConfig Stash a config for use.
Class Method setUp Undocumented
Class Method startSMTPServer Start the SMTP server if it hasn't already been started.
Class Method startAppServer Start the app server if it hasn't already been started.
Class Method stopSMTPServer Kill the SMTP server and wait until it's exited.
Class Method stopAppServer Kill the appserver and wait until it's exited.
Class Method postTestInvariants Enforce some invariants after each test.
Class Method appserver_root_url Undocumented
Class Method _kill Kill the appserver with sig.
Class Method _cleanUpStaleAppServer Kill any stale app server or pid file.
Class Method _runAppServer Start the app server using runlaunchpad.py
Class Method _waitUntilAppServerIsReady Wait until the app server accepts connection.
@classmethod
def setConfig(cls):
Stash a config for use.
@classmethod
def setUp(cls):
Undocumented
@classmethod
@profiled
def startSMTPServer(cls):
Start the SMTP server if it hasn't already been started.
@classmethod
@profiled
def startAppServer(cls, run_name='run'):
Start the app server if it hasn't already been started.
@classmethod
@profiled
def stopSMTPServer(cls):
Kill the SMTP server and wait until it's exited.
@classmethod
def _kill(cls, sig):
Kill the appserver with sig.
Parameterssigthe signal to kill with (type: int)
ReturnsTrue if the signal was delivered, otherwise False. (type: bool)
@classmethod
@profiled
def stopAppServer(cls):
Kill the appserver and wait until it's exited.
@classmethod
@profiled
def postTestInvariants(cls):
Enforce some invariants after each test.

Must be called in your layer class's testTearDown().

@classmethod
def _cleanUpStaleAppServer(cls):
Kill any stale app server or pid file.
@classmethod
def _runAppServer(cls, run_name):
Start the app server using runlaunchpad.py
@classmethod
def appserver_root_url(cls):
Undocumented
@classmethod
def _waitUntilAppServerIsReady(cls):
Wait until the app server accepts connection.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.