[FIX] tests: redirect chrome headless stdout and stderr to dev null

When executing a very long HttpCase browser_js test, it happens that one
of the chrome process PIPE is full (ie. clickEverywhere test).
In that case, the communication with Chrome is blocked.

With this commit the stdout and stderr of the Chrome process are
redirected to /dev/null.
This commit is contained in:
Christophe Monniez
2018-08-31 15:03:11 +02:00
parent 4e7fcf3e07
commit 580a0b2ef7
+1 -1
View File
@@ -483,7 +483,7 @@ class ChromeBrowser():
cmd.append(url)
self._logger.info('chrome_run executing %s', ' '.join(cmd))
try:
self.chrome_process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self.chrome_process = subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except OSError:
raise unittest.SkipTest("%s not found" % cmd[0])
self._logger.info('Chrome pid: %s', self.chrome_process.pid)