Commit 96b70605 authored by Julien Muchembled's avatar Julien Muchembled

runUnitTest: distribute activities automatically if there is only 1 node and no test to run

parent a303a379
......@@ -239,7 +239,8 @@ class ProcessingNodeTestCase(backportUnittest.TestCase, ZopeTestCase.TestCase):
def afterSetUp(self):
"""Initialize a node that will only process activities"""
self.startZServer()
self._registerNode(distributing=0, processing=1)
from Zope2.custom_zodb import cluster
self._registerNode(distributing=not cluster, processing=1)
transaction.commit()
def processing_node(self):
......
......@@ -115,6 +115,8 @@ def forkNodes():
break
node_pid_list.append(pid)
cluster = True
if neo_storage:
if load or save or zeo_client:
raise Exception("--neo_storage conflicts with --load/save/zeo_client")
......@@ -144,6 +146,8 @@ else:
elif activity_node is not None:
# run ZEO server but no need to fork
zeo_server_pid = 0
else:
cluster = False
if save:
Storage = FileStorage(data_fs_path)
......
......@@ -487,7 +487,6 @@ def runUnitTestList(test_list, verbosity=1, debug=0, run_only=None):
TestRunner = backportUnittest.TextTestRunner
import Lifetime
from ZEO.ClientStorage import ClientStorage
from Zope2.custom_zodb import Storage, save_mysql, \
node_pid_list, neo_cluster, zeo_server_pid
def shutdown(signum, frame, signum_set=set()):
......
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