[Erp5-report] r46026 arnaud.fontaine - /erp5/trunk/utils/erp5.utils.benchmark/src/erp5/util...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 31 15:22:36 CEST 2011


Author: arnaud.fontaine
Date: Wed Aug 31 15:22:36 2011
New Revision: 46026

URL: http://svn.erp5.org?rev=46026&view=rev
Log:
Open ERP5 main page before each test suite to avoid side effects for subsequent calls

If  a test  suite  fails  with a  Zope  error, then  'main_form'  will not  be
available for the  next test suite. This also allows to  assume that each test
suite will be ran from ERP5 main page.

Modified:
    erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/process.py

Modified: erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/process.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/process.py?rev=46026&r1=46025&r2=46026&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/process.py [utf8] (original)
+++ erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/process.py [utf8] Wed Aug 31 15:22:36 2011
@@ -51,6 +51,8 @@ class BenchmarkProcess(multiprocessing.P
     # Initialized when running the test
     self._browser = None
     self._current_repeat = 1
+
+    # TODO: Per target error counter instead of global one?
     self._error_counter = 0
 
     super(BenchmarkProcess, self).__init__(*args, **kwargs)
@@ -75,6 +77,7 @@ class BenchmarkProcess(multiprocessing.P
       result.enterSuite(target.__name__)
 
       try:
+        self._browser.open()
         target(result, self._browser)
       except StopIteration:
         raise



More information about the Erp5-report mailing list