[FIX] tests: detect coverage and adjust timeout

When computing coverage, the tests are slowed down and the timeout is
often exceeded.

With this commit, HttpCase headless Chrome tests timeout is increased if
coverage is detected.
This commit is contained in:
Christophe Monniez
2018-09-05 15:30:49 +02:00
parent 69a24eb84b
commit e312ec71dd
+3
View File
@@ -857,6 +857,9 @@ class HttpCase(TransactionCase):
If neither are done before timeout test fails.
"""
# increase timeout if coverage is running
if any(f.filename.endswith('/coverage/execfile.py') for f in inspect.stack() if f.filename):
timeout = timeout * 1.5
self.start_browser(self._logger)
try: