[Neo-report] r2788 jm - in /trunk: neo/tests/functional/ neo/tests/zodb/ tools/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 15 15:33:40 CEST 2011
Author: jm
Date: Wed Jun 15 15:33:40 2011
New Revision: 2788
Log:
functional tests: rename 'master_node_count' parameter to 'master_count'
Modified:
trunk/neo/tests/functional/__init__.py
trunk/neo/tests/functional/testClient.py
trunk/neo/tests/functional/testCluster.py
trunk/neo/tests/functional/testMaster.py
trunk/neo/tests/functional/testStorage.py
trunk/neo/tests/zodb/__init__.py
trunk/neo/tests/zodb/testRecovery.py
trunk/tools/matrix
trunk/tools/perfs
trunk/tools/replication
Modified: trunk/neo/tests/functional/__init__.py
==============================================================================
--- trunk/neo/tests/functional/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/__init__.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -228,7 +228,7 @@ class NEOProcess(object):
class NEOCluster(object):
- def __init__(self, db_list, master_node_count=1, partitions=1, replicas=0,
+ def __init__(self, db_list, master_count=1, partitions=1, replicas=0,
db_user='neo', db_password='neo',
db_super_user=DB_ADMIN, db_super_password=DB_PASSWD,
cleanup_on_delete=False, temp_dir=None, clear_databases=True,
@@ -260,7 +260,7 @@ class NEOCluster(object):
admin_port = self.port_allocator.allocate(address_type, local_ip)
self.cluster_name = 'neo_%s' % (random.randint(0, 100), )
master_node_list = [self.port_allocator.allocate(address_type, local_ip)
- for i in xrange(master_node_count)]
+ for i in xrange(master_count)]
self.master_nodes = '/'.join('%s:%s' % (
buildUrlFromString(self.local_ip), x, )
for x in master_node_list)
Modified: trunk/neo/tests/functional/testClient.py
==============================================================================
--- trunk/neo/tests/functional/testClient.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/testClient.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -73,7 +73,7 @@ class ClientTests(NEOFunctionalTest):
self.neo = NEOCluster(
['test_neo1', 'test_neo2', 'test_neo3', 'test_neo4'],
replicas=2,
- master_node_count=1,
+ master_count=1,
temp_dir=self.getTempDirectory()
)
Modified: trunk/neo/tests/functional/testCluster.py
==============================================================================
--- trunk/neo/tests/functional/testCluster.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/testCluster.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -34,7 +34,7 @@ class ClusterTests(NEOFunctionalTest):
def testClusterBreaks(self):
self.neo = NEOCluster(['test_neo1'],
- master_node_count=1, temp_dir=self.getTempDirectory())
+ master_count=1, temp_dir=self.getTempDirectory())
neoctl = self.neo.getNEOCTL()
self.neo.setupDB()
self.neo.start()
@@ -45,7 +45,7 @@ class ClusterTests(NEOFunctionalTest):
def testClusterBreaksWithTwoNodes(self):
self.neo = NEOCluster(['test_neo1', 'test_neo2'],
- partitions=2, master_node_count=1, replicas=0,
+ partitions=2, master_count=1, replicas=0,
temp_dir=self.getTempDirectory())
neoctl = self.neo.getNEOCTL()
self.neo.setupDB()
@@ -57,7 +57,7 @@ class ClusterTests(NEOFunctionalTest):
def testClusterDoesntBreakWithTwoNodesOneReplica(self):
self.neo = NEOCluster(['test_neo1', 'test_neo2'],
- partitions=2, replicas=1, master_node_count=1,
+ partitions=2, replicas=1, master_count=1,
temp_dir=self.getTempDirectory())
neoctl = self.neo.getNEOCTL()
self.neo.setupDB()
@@ -70,7 +70,7 @@ class ClusterTests(NEOFunctionalTest):
def testElectionWithManyMasters(self):
MASTER_COUNT = 20
self.neo = NEOCluster(['test_neo1', 'test_neo2'],
- partitions=10, replicas=0, master_node_count=MASTER_COUNT,
+ partitions=10, replicas=0, master_count=MASTER_COUNT,
temp_dir=self.getTempDirectory())
neoctl = self.neo.getNEOCTL()
self.neo.start()
@@ -133,7 +133,7 @@ class ClusterTests(NEOFunctionalTest):
connection and disconnection during recovery
"""
self.neo = NEOCluster(['test_neo%d' % i for i in xrange(2)],
- master_node_count=1, partitions=10, replicas=1,
+ master_count=1, partitions=10, replicas=1,
temp_dir=self.getTempDirectory(), clear_databases=True,
)
storages = self.neo.getStorageProcessList()
Modified: trunk/neo/tests/functional/testMaster.py
==============================================================================
--- trunk/neo/tests/functional/testMaster.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/testMaster.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -26,7 +26,7 @@ class MasterTests(NEOFunctionalTest):
def setUp(self):
NEOFunctionalTest.setUp(self)
- self.neo = NEOCluster([], master_node_count=MASTER_NODE_COUNT,
+ self.neo = NEOCluster([], master_count=MASTER_NODE_COUNT,
temp_dir=self.getTempDirectory())
self.neo.stop()
self.neo.start()
Modified: trunk/neo/tests/functional/testStorage.py
==============================================================================
--- trunk/neo/tests/functional/testStorage.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/testStorage.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -51,10 +51,10 @@ class StorageTests(NEOFunctionalTest):
return result
def __setup(self, storage_number=2, pending_number=0, replicas=1,
- partitions=10, master_node_count=2):
+ partitions=10, master_count=2):
# create a neo cluster
self.neo = NEOCluster(['test_neo%d' % i for i in xrange(storage_number)],
- master_node_count=master_node_count,
+ master_count=master_count,
partitions=partitions, replicas=replicas,
temp_dir=self.getTempDirectory(),
clear_databases=True,
@@ -409,7 +409,7 @@ class StorageTests(NEOFunctionalTest):
""" Just tests that cluster can start with more than 1000 partitions.
1000, because currently there is an arbitrary packet split at
every 1000 partition when sending a partition table. """
- self.__setup(storage_number=2, partitions=5000, master_node_count=1)
+ self.__setup(storage_number=2, partitions=5000, master_count=1)
self.neo.expectClusterState(ClusterStates.RUNNING)
def testDropNodeThenRestartCluster(self):
@@ -419,7 +419,7 @@ class StorageTests(NEOFunctionalTest):
# start with two storage / one replica
(started, stopped) = self.__setup(storage_number=2, replicas=1,
- master_node_count=1, partitions=10)
+ master_count=1, partitions=10)
self.neo.expectRunning(started[0])
self.neo.expectRunning(started[1])
self.neo.expectOudatedCells(number=0)
Modified: trunk/neo/tests/zodb/__init__.py
==============================================================================
--- trunk/neo/tests/zodb/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/zodb/__init__.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -33,7 +33,7 @@ class ZODBTestCase(NEOFunctionalTest):
db_list=['test_neo%d' % x for x in xrange(storages)],
partitions=partitions,
replicas=replicas,
- master_node_count=masters,
+ master_count=masters,
temp_dir=self.getTempDirectory(),
**cluster_kw)
self.neo.start()
Modified: trunk/neo/tests/zodb/testRecovery.py
==============================================================================
--- trunk/neo/tests/zodb/testRecovery.py [iso-8859-1] (original)
+++ trunk/neo/tests/zodb/testRecovery.py [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -33,7 +33,7 @@ class RecoveryTests(ZODBTestCase, Storag
if not os.path.exists(dst_temp_dir):
os.makedirs(dst_temp_dir)
self.neo_dst = NEOCluster(['test_neo1-dst'], partitions=1, replicas=0,
- master_node_count=1, temp_dir=dst_temp_dir)
+ master_count=1, temp_dir=dst_temp_dir)
self.neo_dst.stop()
self.neo_dst.setupDB()
self.neo_dst.start()
Modified: trunk/tools/matrix
==============================================================================
--- trunk/tools/matrix [iso-8859-1] (original)
+++ trunk/tools/matrix [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -76,23 +76,21 @@ class MatrixImportBenchmark(BenchmarkRun
datafs = 'PROD1'
import random, neo.tests.stat_zodb
dfs_storage = getattr(neo.tests.stat_zodb, datafs)(
- random.Random(0)).as_storage(100)
+ random.Random(0)).as_storage(10000)
print "Import of %s with m=%s, s=%s, r=%s, p=%s" % (
datafs, masters, storages, replicas, partitions)
- # cluster
- kw = dict(
+ if self._config.threaded:
+ from neo.tests.threaded import NEOCluster
+ else:
+ from neo.tests.functional import NEOCluster
+ neo = NEOCluster(
db_list=['neot_matrix_%d' % i for i in xrange(storages)],
clear_databases=True,
+ master_count=masters,
partitions=partitions,
replicas=replicas,
verbose=self._config.verbose,
)
- if self._config.threaded:
- from neo.tests.threaded import NEOCluster
- neo = NEOCluster(master_count=masters, **kw)
- else:
- from neo.tests.functional import NEOCluster
- neo = NEOCluster(master_node_count=masters, **kw)
neo.start()
neo_storage = neo.getZODBStorage()
# import
Modified: trunk/tools/perfs
==============================================================================
--- trunk/tools/perfs [iso-8859-1] (original)
+++ trunk/tools/perfs [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -42,7 +42,7 @@ class ImportBenchmark(BenchmarkRunner):
clear_databases=True,
partitions=config.partitions,
replicas=config.replicas,
- master_node_count=config.masters,
+ master_count=config.masters,
verbose=False,
)
Modified: trunk/tools/replication
==============================================================================
--- trunk/tools/replication [iso-8859-1] (original)
+++ trunk/tools/replication [iso-8859-1] Wed Jun 15 15:33:40 2011
@@ -72,7 +72,7 @@ class ReplicationBenchmark(BenchmarkRunn
clear_databases=True,
partitions=config.partitions,
replicas=1,
- master_node_count=1,
+ master_count=1,
verbose=False,
)
neo.start()
More information about the Neo-report
mailing list