summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-05-16 15:35:58 +0000
committerGerrit Code Review <review@openstack.org>2020-05-16 15:35:58 +0000
commitff1d7fe6d6f73d15e5be8d9c7fa857e02b2e3051 (patch)
treefeeffaf22505bd9f9a7e17f499d1c26beab3c4e6
parent41225744e67c8106a21a709a622fda4df5cce93f (diff)
parent15bc66b02783d1ac969892e362c736ed535d8e30 (diff)
downloadzuul-ff1d7fe6d6f73d15e5be8d9c7fa857e02b2e3051.tar.gz
Merge "Add details to waitUntilSettled() debug log"
-rw-r--r--tests/base.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/base.py b/tests/base.py
index 6d369133d..a697be384 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -4401,7 +4401,9 @@ class ZuulTestCase(BaseTestCase):
def waitUntilSettled(self, msg="", matcher=None) -> None:
self.log.debug("Waiting until settled... (%s)", msg)
start = time.time()
+ i = 0
while True:
+ i = i + 1
if time.time() - start > self.wait_timeout:
self.log.error("Timeout waiting for Zuul to settle")
self.log.error("Queue status:")
@@ -4418,9 +4420,10 @@ class ZuulTestCase(BaseTestCase):
self.log.error("[Sched: %s] Merge client jobs: %s" %
(app.sched, app.sched.merger.jobs,))
raise Exception("Timeout waiting for Zuul to settle")
- # Make sure no new events show up while we're checking
+ # Make sure no new events show up while we're checking
self.executor_server.lock.acquire()
+
# have all build states propogated to zuul?
if self.__haveAllBuildsReported(matcher):
# Join ensures that the queue is empty _and_ events have been
@@ -4441,7 +4444,8 @@ class ZuulTestCase(BaseTestCase):
self.scheds.execute(
lambda app: app.sched.run_handler_lock.release())
self.executor_server.lock.release()
- self.log.debug("...settled. (%s)", msg)
+ self.log.debug("...settled after %.3f ms / %s loops (%s)",
+ time.time() - start, i, msg)
self.logState()
return
self.scheds.execute(