Re-enable test_dependent_behind_dequeue

This test was already refactored for v3, but it was causing occasional
timeouts. This is a very merge-heavy test, and as such, sometimes runs
out of time when contending for resources. So we'll bump the overall
hard-timeout by 30 seconds which should prevent us from timing out at
that level, and also raise the soft wait timeout to 90 seconds for just
this test.

Change-Id: I74e54d8a7d9b813772c498ccb87fb6644b533842
This commit is contained in:
Clint Byrum 2017-02-22 14:04:00 -05:00 committed by James E. Blair
parent 7b71b2f1a6
commit a962657f56
3 changed files with 6 additions and 3 deletions

View File

@ -1069,6 +1069,7 @@ class ChrootedKazooFixture(fixtures.Fixture):
class BaseTestCase(testtools.TestCase):
log = logging.getLogger("zuul.test")
wait_timeout = 20
def attachLogs(self, *args):
def reader():
@ -1611,7 +1612,7 @@ class ZuulTestCase(BaseTestCase):
self.log.debug("Waiting until settled...")
start = time.time()
while True:
if time.time() - start > 20:
if time.time() - start > self.wait_timeout:
self.log.error("Timeout waiting for Zuul to settle")
self.log.error("Queue status:")
for queue in self.event_queues:

View File

@ -1273,8 +1273,10 @@ class TestScheduler(ZuulTestCase):
self.assertEqual(self.getJobFromHistory('project-test2').result,
'FAILURE')
@skip("This test generally works but times out frequently")
def test_dependent_behind_dequeue(self):
# This particular test does a large amount of merges and needs a little
# more time to complete
self.wait_timeout = 90
"test that dependent changes behind dequeued changes work"
# This complicated test is a reproduction of a real life bug
self.sched.reconfigure(self.config)

View File

@ -8,7 +8,7 @@ envlist = pep8, py27
setenv = STATSD_HOST=127.0.0.1
STATSD_PORT=8125
VIRTUAL_ENV={envdir}
OS_TEST_TIMEOUT=60
OS_TEST_TIMEOUT=90
passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_LOG_DEFAULTS
usedevelop = True
install_command = pip install {opts} {packages}