Commit 28eafad4 authored by Julien Muchembled's avatar Julien Muchembled

Stop initializing 'serverhost' & 'serverport' on the testcase class.

It was unreliable because done only for the first test.
Code needing this information can simply call startZServer, which will simply
return host/port of already started ZServer.
parent c50a24e2
......@@ -35,8 +35,6 @@ import subprocess
import shutil
import transaction
from ZPublisher.HTTPResponse import HTTPResponse
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase, \
_getConversionServerDict
......@@ -372,8 +370,8 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
self.setSystemPreference()
self.portal.portal_tests.TestTool_cleanUpTestResults()
self.tic()
utils = ZopeTestCase.utils
self.runner = FunctionalTestRunner(utils._Z2HOST, utils._Z2PORT,
host, port = self.startZServer()
self.runner = FunctionalTestRunner(host, port,
self.portal, self.run_only, self.use_phanthom)
def setSystemPreference(self):
......
......@@ -1064,7 +1064,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
if len(setup_done) == 1: # make sure it is run only once
self._setUpDummyMailHost()
self.serverhost, self.serverport = self.startZServer(verbose=True)
self.startZServer(verbose=True)
self._registerNode(distributing=1, processing=1)
self.loadPromise()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment