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) <xdo@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user