launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24504
[Merge] ~cjwatson/launchpad:fix-stormify-branchjob into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:fix-stormify-branchjob into launchpad:master.
Commit message:
Fix TestRunMissingJobs.test_find_missing_ready
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/381172
After converting BranchJob to Storm, we need to flush database caches before we can read back the job.id serial column.
This fixes a test failure on buildbot.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-stormify-branchjob into launchpad:master.
diff --git a/lib/lp/services/job/tests/test_celeryjob.py b/lib/lp/services/job/tests/test_celeryjob.py
index 08cac72..d1991c1 100644
--- a/lib/lp/services/job/tests/test_celeryjob.py
+++ b/lib/lp/services/job/tests/test_celeryjob.py
@@ -11,6 +11,7 @@ from testtools.content_type import UTF8_TEXT
from lp.code.model.branchjob import BranchScanJob
from lp.scripts.helpers import TransactionFreeOperation
+from lp.services.database.sqlbase import flush_database_updates
from lp.services.features.testing import FeatureFixture
from lp.services.job.tests import (
celery_worker,
@@ -76,6 +77,7 @@ class TestRunMissingJobs(TestCaseWithFactory):
def test_find_missing_ready(self):
"""A job which is ready but not queued is "missing"."""
job = self.createMissingJob()
+ flush_database_updates()
self.addTextDetail(
'job_info', 'job.id: %d, job.job_id: %d' % (job.id, job.job_id))
find_missing_ready_obj = self.getFMR(BranchScanJob, 0)