Commit 6c8f6156 authored by Vincent Pelletier's avatar Vincent Pelletier

Add a test for partition repartition.

Add a test for partition replication.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1225 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 57c6a8ab
......@@ -33,6 +33,32 @@ class ClusterTests(unittest.TestCase):
finally:
neo.stop()
def testClusterBreaksWithTwoNodes(self):
neo = NEOCluster(['test_neo1', 'test_neo2'], port_base=20000,
partitions=2, master_node_count=1)
neoctl = neo.getNEOCTL()
neo.setupDB()
neo.start()
try:
self.assertEqual(neoctl.getClusterState(), protocol.RUNNING)
neo.killStorage()
neo.expectClusterState(protocol.VERIFYING)
finally:
neo.stop()
def testClusterDoesntBreakWithTwoNodesOneReplica(self):
neo = NEOCluster(['test_neo1', 'test_neo2'], port_base=20000,
partitions=2, replicas=1, master_node_count=1)
neoctl = neo.getNEOCTL()
neo.setupDB()
neo.start()
try:
self.assertEqual(neoctl.getClusterState(), protocol.RUNNING)
neo.killStorage()
neo.expectClusterState(protocol.RUNNING)
finally:
neo.stop()
def test_suite():
return unittest.makeSuite(ClusterTests)
......
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