From 761860a2a7bb8a69b696a787607a9d091719fa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Wisniewski?= <gregory@nexedi.com> Date: Thu, 28 Jan 2010 16:52:05 +0000 Subject: [PATCH] Add a test to ensure election success with many master nodes. git-svn-id: https://svn.erp5.org/repos/neo/trunk@1539 71dcc9de-d417-0410-9af5-da40c76e7ee4 --- neo/tests/functional/testCluster.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/neo/tests/functional/testCluster.py b/neo/tests/functional/testCluster.py index 21baae54..bf8de342 100644 --- a/neo/tests/functional/testCluster.py +++ b/neo/tests/functional/testCluster.py @@ -63,6 +63,17 @@ class ClusterTests(NEOFunctionalTest): self.neo.killStorage() self.neo.expectClusterRunning() + def testElectionWithManyMasters(self): + MASTER_COUNT = 20 + self.neo = NEOCluster(['test_neo1', 'test_neo2'], port_base=20000, + partitions=10, replicas=0, master_node_count=MASTER_COUNT, + temp_dir=self.getTempDirectory()) + neoctl = self.neo.getNEOCTL() + self.neo.start() + self.neo.expectClusterRunning() + self.neo.expectAllMasters(MASTER_COUNT) + self.neo.expectOudatedCells(0) + def test_suite(): return unittest.makeSuite(ClusterTests) -- 2.30.9