← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/launchpad:improve-flaky-unit-tests into launchpad:master

 

Ines Almeida has proposed merging ~ines-almeida/launchpad:improve-flaky-unit-tests into launchpad:master.

Commit message:
Increase timeouts of regularly failing unit tests

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/454723

Going through the list of build failures of our build bot (http://lpbuildbot.canonical.com/builders/lp-devel-xenial), these 2 tests seem to constantly make an appearance.

Although constantly increasing these timeouts isn't the best solution, it seems like a better option than having to force builds a few times every time we want to deploy something.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:improve-flaky-unit-tests into launchpad:master.
diff --git a/lib/lp/services/job/tests/test_celeryjob.py b/lib/lp/services/job/tests/test_celeryjob.py
index ca2e575..305765f 100644
--- a/lib/lp/services/job/tests/test_celeryjob.py
+++ b/lib/lp/services/job/tests/test_celeryjob.py
@@ -150,12 +150,12 @@ class TestRunMissingJobs(TestCaseWithFactory):
         # So let's be sure that a task is queued...
         # Give the system some time to deliver the message
         self.assertQueueSize(self.run_missing_ready.app, [job_queue_name], 1)
-        # Wait at most 60 seconds for "celery worker" to start and process
+        # Wait at most 70 seconds for "celery worker" to start and process
         # the task.
         with celery_worker(job_queue_name):
             # Due to FIFO ordering, this will only return after
             # run_missing_ready has finished.
-            noop.apply_async(queue=job_queue_name).wait(60)
+            noop.apply_async(queue=job_queue_name).wait(70)
         # But now the message has been consumed by "celery worker".
         self.assertQueueSize(self.run_missing_ready.app, [job_queue_name], 0)
         # No result queue was created for the task.
diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py
index 637c47c..ff79108 100644
--- a/lib/lp/testing/layers.py
+++ b/lib/lp/testing/layers.py
@@ -642,7 +642,7 @@ class RabbitMQLayer(BaseLayer):
 
     # The default timeout is 15 seconds, but increase this a bit to allow
     # some more leeway for slow test environments.
-    rabbit = RabbitServer(ctltimeout=120)
+    rabbit = RabbitServer(ctltimeout=150)
 
     _is_setup = False