From 580a0b2ef72ee4a6384abac14e81db9cbf1ec794 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 31 Aug 2018 13:47:53 +0200 Subject: [PATCH] [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. --- odoo/tests/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 5c2c25b1a8b..25c2e8b20e2 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -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)