From e312ec71ddd086a748d2ee53cebf8d8ed25b8b08 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 28 Aug 2018 16:22:50 +0200 Subject: [PATCH] [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. --- odoo/tests/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index b87a42519eb..ff6938beb09 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -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: