~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/job/tests/test_runner.py

  • Committer: Curtis Hovey
  • Date: 2011-09-06 12:13:13 UTC
  • mfrom: (13883 devel)
  • mto: This revision was merged to the branch mainline in revision 13884.
  • Revision ID: curtis.hovey@canonical.com-20110906121313-2r9ep4ird8jw4nrl
Merged devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
500
500
        self.x = '*' * (10 ** 6)
501
501
 
502
502
 
503
 
class NoJobs(StaticJobSource):
504
 
 
505
 
    done = False
506
 
 
507
 
    jobs = []
508
 
 
509
 
 
510
503
class TestTwistedJobRunner(ZopeTestInSubProcess, TestCaseWithFactory):
511
504
 
512
505
    layer = ZopelessDatabaseLayer
615
608
        oops = self.getOopsReport(runner, 0)
616
609
        self.assertEqual('MemoryError', oops.type)
617
610
 
618
 
    def test_no_jobs(self):
619
 
        logger = BufferLogger()
620
 
        logger.setLevel(logging.INFO)
621
 
        runner = TwistedJobRunner.runFromSource(
622
 
            NoJobs, 'branchscanner', logger)
623
 
        self.assertEqual(
624
 
            (0, 0), (len(runner.completed_jobs), len(runner.incomplete_jobs)))
625
 
 
626
611
 
627
612
class TestJobCronScript(ZopeTestInSubProcess, TestCaseWithFactory):
628
613