summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2020-01-27 17:03:36 +0100
committerAntoine Musso <hashar@free.fr>2020-04-02 10:46:54 +0200
commit15bc66b02783d1ac969892e362c736ed535d8e30 (patch)
tree47db8e18f4936ab0efe5a52a79723244c607416c
parentd6beb77397f596dbd333975d31b6f3af02ea8f6d (diff)
downloadzuul-15bc66b02783d1ac969892e362c736ed535d8e30.tar.gz
Add details to waitUntilSettled() debug log
Change-Id: Ibf35cec257063a0b316048487909136a9cc6fd36
-rw-r--r--tests/base.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/base.py b/tests/base.py
index 527bdf66c..bfc1f5045 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -4317,7 +4317,9 @@ class ZuulTestCase(BaseTestCase):
def waitUntilSettled(self, msg=""):
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:")
@@ -4333,9 +4335,10 @@ class ZuulTestCase(BaseTestCase):
self.log.error("Merge client jobs: %s" %
(self.merge_client.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():
# Join ensures that the queue is empty _and_ events have been
@@ -4354,7 +4357,8 @@ class ZuulTestCase(BaseTestCase):
# report that we are settled.
self.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.sched.run_handler_lock.release()