diff options
| author | Christophe Monniez <moc@odoo.com> | 2018-08-28 16:22:50 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-10-18 11:59:44 +0200 |
| commit | 2f63e1e973fdca02eb854b1e83263a4e901f340d (patch) | |
| tree | 5eaa0cc3515abecc0d3b34881b86b02c86bb906f /odoo/tests | |
| parent | 383ed26657754fb71d35e9f9014a600d273a9d8a (diff) | |
[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.
Diffstat (limited to 'odoo/tests')
| -rw-r--r-- | odoo/tests/common.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 093614c5dfa..64659538162 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -7,6 +7,7 @@ helpers and classes to write tests. import base64 import collections import importlib +import inspect import itertools import json import logging @@ -789,6 +790,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: |
