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
diff --git a/tests/base.py b/tests/base.py
index 4525627..52c073f 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1069,6 +1069,7 @@
 
 class BaseTestCase(testtools.TestCase):
     log = logging.getLogger("zuul.test")
+    wait_timeout = 20
 
     def attachLogs(self, *args):
         def reader():
@@ -1611,7 +1612,7 @@
         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:
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index c787f73..45b2257 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -1273,8 +1273,10 @@
         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)
diff --git a/tox.ini b/tox.ini
index b7d89d1..9c0d949 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,7 +8,7 @@
 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}