[IMP] attempt to fix intermittent UI test errors

bzr revid: ddm@openerp.com-20140109104234-x1on4xm0hkdym2l8
This commit is contained in:
ddm@openerp.com
2014-01-09 11:42:34 +01:00
parent 7692df62c6
commit 492af3afbf
+4 -1
View File
@@ -4,7 +4,7 @@ import os
import select
import time
import json
from openerp import tools
from openerp import sql_db, tools
# avoid "ValueError: too many values to unpack"
def _exc_info_to_string(err, test):
@@ -49,6 +49,9 @@ class WebsiteUiSuite(unittest.TestSuite):
return iter([self])
def run(self, result):
# clean slate
if sql_db._Pool is not None:
sql_db._Pool.close_all(sql_db.dsn(tools.config['db_name']))
# check for PhantomJS...
try:
subprocess.call([ 'phantomjs', '-v' ], stdout=open(os.devnull, 'w'), stderr=subprocess.STDOUT)