← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~abentley/launchpad/better-find-missing-ready-error into lp:launchpad

 

Aaron Bentley has proposed merging lp:~abentley/launchpad/better-find-missing-ready-error into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~abentley/launchpad/better-find-missing-ready-error/+merge/117669

= Summary =
Add detailed failure output to test_find_missing_ready

== Proposed fix ==

== Pre-implementation notes ==
Discussed with deryck

== LOC Rationale ==
I have a LOC credit of 1928

== Implementation details ==
None

== Tests ==
bin/test -t test_find_missing_ready

== Demo and Q/A ==
None


= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/services/job/tests/test_celeryjob.py
-- 
https://code.launchpad.net/~abentley/launchpad/better-find-missing-ready-error/+merge/117669
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/launchpad/better-find-missing-ready-error into lp:launchpad.
=== modified file 'lib/lp/services/job/tests/test_celeryjob.py'
--- lib/lp/services/job/tests/test_celeryjob.py	2012-07-30 19:07:47 +0000
+++ lib/lp/services/job/tests/test_celeryjob.py	2012-08-01 14:53:21 +0000
@@ -62,7 +62,14 @@
         job.runViaCelery()
         self.assertQueueSize(self.CeleryRunJob.app,
                              [BranchScanJob.task_queue], 1)
-        self.assertEqual([], self.find_missing_ready(BranchScanJob))
+        #self.assertEqual([], self.find_missing_ready(BranchScanJob))
+        # Temporary extra diagnostic info:
+        if self.find_missing_ready(BranchScanJob) != []:
+            from lazr.jobrunner.celerytask import list_queued
+            contents = list_queued(
+                self.CeleryRunJob.app, [BranchScanJob.task_queue])
+            self.fail('queue: %r, job.id: %d, job.job_id: %d' %
+                      (contents, job.id, job.job_id))
         drain_celery_queues()
         self.assertQueueSize(self.CeleryRunJob.app,
                              [BranchScanJob.task_queue], 0)


Follow ups