From 7ed51f9dd644a87ec9e0464dbbb36cca0bf8446b Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 16 Aug 2019 12:51:53 +0000 Subject: [PATCH] [IMP] tests: verify that the browser is running When issuing the first json command, it happens that the chrome process has crashed. As a consequence, a log entry appears with saying that it could not connect to chrome debugger. After some investigations, it appeared that it was only happening with google-chrome versions 75.0.3770.90 and 74.0.3729.169. This error message was seen on the chrome stderr: listp->slotinfo[cnt].gen <= GL(dl_tls_generation). As a conclusion, it seems that we were hit by this issue: https://github.com/GoogleChrome/puppeteer/issues/2207 While this commit does not fix the google-chrome issue, it adds a new verification to check if google-chrome process is running before trying to issue the json command. If it's not case, an error message is logged with the error code. --- odoo/tests/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 3611fec68b2..028ece0054a 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -638,6 +638,9 @@ class ChromeBrowser(): tries = 0 failure_info = None while tries * delay < timeout: + if self.chrome_process.poll() is not None: + self._logger.error('Chrome crashed at startup with return code', self.chrome_process.returncode) + break try: r = requests.get(url, timeout=3) if r.ok: