l.b.t.t.TestSlaveScannerScan(TestCaseWithFactory) : class documentation

Part of lp.buildmaster.tests.test_manager View In Hierarchy

Tests SlaveScanner.scan method.

This method uses the old framework for scanning and dispatching builds.

Method setUp Set up BuilddSlaveTest.
Method assertBuildingJob Assert the given job is building on the given builder.
Method testScanDispatchForResetBuilder Undocumented
Method testScanRescuesJobFromBrokenBuilder Undocumented
Method testScanUpdatesBuildingJobs Undocumented
Method test_scan_with_nothing_to_dispatch Undocumented
Method test_scan_with_manual_builder Undocumented
Method test_scan_with_not_ok_builder Undocumented
Method test_scan_of_broken_slave Undocumented
Method test_scan_of_partial_utf8_logtail Undocumented
Method test_scan_of_logtail_containing_nul Undocumented
Method test_scan_calls_builder_factory_prescanUpdate Undocumented
Method test_scan_skipped_if_builderfactory_stale Undocumented
Method test_scan_of_snap_build Undocumented
Method test_scan_first_fail Undocumented
Method test_scan_second_builder_fail Undocumented
Method test_scan_second_job_fail Undocumented
Method test_scanFailed_handles_lack_of_a_job_on_the_builder Undocumented
Method test_fail_to_resume_leaves_it_dirty Undocumented
Method test_isolation_error_means_death Undocumented
Method test_update_slave_version Undocumented
Method test_updateVersion_no_op Undocumented
Method test_cancelling_a_build Undocumented
Method _resetBuilder Reset the given builder and its job.
Method _getScanner Instantiate a SlaveScanner object.
Method _checkNoDispatch Assert that no dispatch has occurred.
Method _checkJobRescued SlaveScanner.scan rescued the job.
Method _checkJobUpdated SlaveScanner.scan updates legitimate jobs.
Method _assertFailureCounting Undocumented

Inherited from TestCaseWithFactory:

Method getUserBrowser Return a Browser logged in as a fresh user, maybe opened at url.
Method getNonRedirectingBrowser Undocumented
Method createBranchAtURL Create a branch at the supplied URL.
Method create_branch_and_tree Create a database branch, bzr branch and bzr checkout.
Method createBzrBranch Create a bzr branch for a database branch.
Static Method getBranchPath Return the path of the branch in the mirrored area.
Method useTempBzrHome Undocumented
Method useBzrBranches Prepare for using bzr branches.

Inherited from TestCase (via TestCaseWithFactory):

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.
def setUp(self):
Set up BuilddSlaveTest.

Also adjust the sampledata in a way a build can be dispatched to 'bob' builder.

def _resetBuilder(self, builder):
Reset the given builder and its job.
def assertBuildingJob(self, job, builder, logtail=None):
Assert the given job is building on the given builder.
def _getScanner(self, builder_name=None, clock=None, builder_factory=None):
Instantiate a SlaveScanner object.

Replace its default logging handler by a testing version.

@defer.inlineCallbacks
def testScanDispatchForResetBuilder(self):
Undocumented
def _checkNoDispatch(self, slave, builder):
Assert that no dispatch has occurred.

'slave' is None, so no interations would be passed to the asynchonous dispatcher and the builder remained active and IDLE.

def _checkJobRescued(self, slave, builder, job):
SlaveScanner.scan rescued the job.

Nothing gets dispatched, the 'broken' builder remained disabled and the 'rescued' job is ready to be dispatched.

@defer.inlineCallbacks
def testScanRescuesJobFromBrokenBuilder(self):
Undocumented
def _checkJobUpdated(self, slave, builder, job, logtail='This is a build log: 0'):
SlaveScanner.scan updates legitimate jobs.

Job is kept assigned to the active builder and its 'logtail' is updated.

def testScanUpdatesBuildingJobs(self):
Undocumented
def test_scan_with_nothing_to_dispatch(self):
Undocumented
def test_scan_with_manual_builder(self):
Undocumented
@defer.inlineCallbacks
def test_scan_with_not_ok_builder(self):
Undocumented
def test_scan_of_broken_slave(self):
Undocumented
def test_scan_of_partial_utf8_logtail(self):
Undocumented
def test_scan_of_logtail_containing_nul(self):
Undocumented
@defer.inlineCallbacks
def test_scan_calls_builder_factory_prescanUpdate(self):
Undocumented
@defer.inlineCallbacks
def test_scan_skipped_if_builderfactory_stale(self):
Undocumented
@defer.inlineCallbacks
def test_scan_of_snap_build(self):
Undocumented
@defer.inlineCallbacks
def _assertFailureCounting(self, builder_count, job_count, expected_builder_count, expected_job_count):
Undocumented
def test_scan_first_fail(self):
Undocumented
def test_scan_second_builder_fail(self):
Undocumented
def test_scan_second_job_fail(self):
Undocumented
@defer.inlineCallbacks
def test_scanFailed_handles_lack_of_a_job_on_the_builder(self):
Undocumented
@defer.inlineCallbacks
def test_fail_to_resume_leaves_it_dirty(self):
Undocumented
@defer.inlineCallbacks
def test_isolation_error_means_death(self):
Undocumented
@defer.inlineCallbacks
def test_update_slave_version(self):
Undocumented
def test_updateVersion_no_op(self):
Undocumented
@defer.inlineCallbacks
def test_cancelling_a_build(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2020-09-22 00:00:09.