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

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 316a8ee5d03ec64ae95608541ed9fab658df26ff
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:improve-flaky-unit-tests
Merge into: launchpad:master
Diff against target: 31 lines (+3/-3)
2 files modified
lib/lp/services/job/tests/test_celeryjob.py (+2/-2)
lib/lp/testing/layers.py (+1/-1)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+454723@code.launchpad.net

Commit message

Increase timeouts of regularly failing unit tests

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/services/job/tests/test_celeryjob.py b/lib/lp/services/job/tests/test_celeryjob.py
2index ca2e575..305765f 100644
3--- a/lib/lp/services/job/tests/test_celeryjob.py
4+++ b/lib/lp/services/job/tests/test_celeryjob.py
5@@ -150,12 +150,12 @@ class TestRunMissingJobs(TestCaseWithFactory):
6 # So let's be sure that a task is queued...
7 # Give the system some time to deliver the message
8 self.assertQueueSize(self.run_missing_ready.app, [job_queue_name], 1)
9- # Wait at most 60 seconds for "celery worker" to start and process
10+ # Wait at most 70 seconds for "celery worker" to start and process
11 # the task.
12 with celery_worker(job_queue_name):
13 # Due to FIFO ordering, this will only return after
14 # run_missing_ready has finished.
15- noop.apply_async(queue=job_queue_name).wait(60)
16+ noop.apply_async(queue=job_queue_name).wait(70)
17 # But now the message has been consumed by "celery worker".
18 self.assertQueueSize(self.run_missing_ready.app, [job_queue_name], 0)
19 # No result queue was created for the task.
20diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py
21index 637c47c..ff79108 100644
22--- a/lib/lp/testing/layers.py
23+++ b/lib/lp/testing/layers.py
24@@ -642,7 +642,7 @@ class RabbitMQLayer(BaseLayer):
25
26 # The default timeout is 15 seconds, but increase this a bit to allow
27 # some more leeway for slow test environments.
28- rabbit = RabbitServer(ctltimeout=120)
29+ rabbit = RabbitServer(ctltimeout=150)
30
31 _is_setup = False
32

Subscribers

People subscribed via source and target branches

to status/vote changes: