← Back to team overview

yellow team mailing list archive

[Merge] lp:~frankban/launchpad/bug-987442-testSimpleScriptRun into lp:launchpad

 

Francesco Banconi has proposed merging lp:~frankban/launchpad/bug-987442-testSimpleScriptRun into lp:launchpad.

Requested reviews:
  Launchpad Yellow Squad (yellow)
Related bugs:
  Bug #987442 in Launchpad itself: "lp.soyuz.scripts.tests.test_processpendingpackagediffs.TestProcessPendingPackageDiffsScript.testSimpleScriptRun fails intermittently in parallel tests"
  https://bugs.launchpad.net/launchpad/+bug/987442

For more details, see:
https://code.launchpad.net/~frankban/launchpad/bug-987442-testSimpleScriptRun/+merge/103706

== Changes ==

This is similar to bug 849056: I've found another test running a cron script and not marking the db dirty.
Applied the fix used by Graham.

-- 
https://code.launchpad.net/~frankban/launchpad/bug-987442-testSimpleScriptRun/+merge/103706
Your team Launchpad Yellow Squad is requested to review the proposed merge of lp:~frankban/launchpad/bug-987442-testSimpleScriptRun into lp:launchpad.
=== modified file 'lib/lp/soyuz/tests/test_initializedistroseriesjob.py'
--- lib/lp/soyuz/tests/test_initializedistroseriesjob.py	2012-04-20 18:28:17 +0000
+++ lib/lp/soyuz/tests/test_initializedistroseriesjob.py	2012-04-26 14:23:49 +0000
@@ -36,6 +36,7 @@
 from lp.testing.layers import (
     CeleryJobLayer,
     DatabaseFunctionalLayer,
+    DatabaseLayer,
     LaunchpadZopelessLayer,
     )
 
@@ -352,6 +353,7 @@
     def test_cronscript(self):
         run_script(
             'cronscripts/run_jobs.py', ['-v', 'initializedistroseries'])
+        DatabaseLayer.force_dirty_database()
 
 
 class TestViaCelery(TestCaseWithFactory):