From dd85e312cdde94282fa6bc08de6acea7c0469736 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Sat, 18 May 2019 10:29:02 +0000 Subject: [PATCH] [FIX] core: backport of 62533ec7 and f167ae7d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ready code warning timeout of 2 seconds can be confusing since it is triggered just after the 2 seconds. We can log this message at the end in order to give the real timeout. In JS tests, when the ready code takes too much time, a warning is logged. As a consequence, the runbot updates the github status as a failure, causing real pain to people who simply wants to merge their features. With this commit the warning is changed into an info and the runbot will be happy. closes odoo/odoo#34865 Signed-off-by: Xavier Dollé (xdo) --- odoo/tests/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 5d934c979c1..06906d45086 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -725,6 +725,8 @@ class ChromeBrowser(): res = None if res and res.get('id') == ready_id: if res.get('result') == awaited_result: + if has_exceeded: + self._logger.info('The ready code tooks too much time : %s', tdiff) return True else: last_bad_res = res @@ -732,7 +734,6 @@ class ChromeBrowser(): tdiff = time.time() - start_time if tdiff >= 2 and not has_exceeded: has_exceeded = True - self._logger.warning('The ready code takes too much time : %s', tdiff) self.take_screenshot(prefix='failed_ready') self._logger.info('Ready code last try result: %s', last_bad_res or res)