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