Improve test output
* When a test timeout occurs, output the state debug information at error level so that it shows up in all logs. * Add some more info to that output. * Further restrict the (often not useful) chatty gear logs by default. Change-Id: Ib275441172c5b1598593d0931cef0168d02e521d
This commit is contained in:
parent
e75768068b
commit
10fc1eb487
|
@ -1517,13 +1517,18 @@ class ZuulTestCase(BaseTestCase):
|
|||
start = time.time()
|
||||
while True:
|
||||
if time.time() - start > 10:
|
||||
self.log.debug("Queue status:")
|
||||
self.log.error("Timeout waiting for Zuul to settle")
|
||||
self.log.error("Queue status:")
|
||||
for queue in self.event_queues:
|
||||
self.log.debug(" %s: %s" % (queue, queue.empty()))
|
||||
self.log.debug("All builds waiting: %s" %
|
||||
self.log.error(" %s: %s" % (queue, queue.empty()))
|
||||
self.log.error("All builds waiting: %s" %
|
||||
(self.areAllBuildsWaiting(),))
|
||||
self.log.debug("All builds reported: %s" %
|
||||
self.log.error("All builds reported: %s" %
|
||||
(self.haveAllBuildsReported(),))
|
||||
self.log.error("All requests completed: %s" %
|
||||
(self.areAllNodeRequestsComplete(),))
|
||||
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
|
||||
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -9,7 +9,7 @@ setenv = STATSD_HOST=127.0.0.1
|
|||
STATSD_PORT=8125
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_TEST_TIMEOUT=30
|
||||
OS_LOG_DEFAULTS={env:OS_LOG_DEFAULTS:gear.Server=INFO,gear.Client=INFO}
|
||||
OS_LOG_DEFAULTS={env:OS_LOG_DEFAULTS:gear=WARNING}
|
||||
passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
|
|
Loading…
Reference in New Issue