Commit 2cfd0545 authored by Vincent Pelletier's avatar Vincent Pelletier

Instead of stopping the whole cluster, only stop masters. This avoids...

Instead of stopping the whole cluster, only stop masters. This avoids disconnecting neoctl from admin process, as it will not reconnect (to be tested separately).


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1166 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f5e3d4b5
...@@ -52,6 +52,11 @@ class MasterTests(unittest.TestCase): ...@@ -52,6 +52,11 @@ class MasterTests(unittest.TestCase):
def killSecondaryMaster(self, all=False): def killSecondaryMaster(self, all=False):
return self._killMaster(primary=False, all=all) return self._killMaster(primary=False, all=all)
def killMasters(self):
secondary_list = self.killSecondaryMaster(all=True)
primary_list = self.killPrimaryMaster()
return secondary_list + primary_list
def getMasterNodeList(self): def getMasterNodeList(self):
return self.neoctl.getNodeList(protocol.MASTER_NODE_TYPE) return self.neoctl.getNodeList(protocol.MASTER_NODE_TYPE)
...@@ -121,13 +126,12 @@ class MasterTests(unittest.TestCase): ...@@ -121,13 +126,12 @@ class MasterTests(unittest.TestCase):
self.assertNotEqual(new_uuid, uuid) self.assertNotEqual(new_uuid, uuid)
def testMasterSequentialStart(self): def testMasterSequentialStart(self):
# Stop the cluster (so we can start processes manually)
neo.stop()
master_list = neo.getMasterProcessList() master_list = neo.getMasterProcessList()
# Test sanity check. # Test sanity check.
self.assertEqual(len(master_list), 3) self.assertEqual(len(master_list), 3)
# Start the admin node.
neo.getAdminProcessList()[0].start() # Stop the cluster (so we can start processes manually)
self.killMasters()
# Start the first master. # Start the first master.
first_master = master_list[0] first_master = master_list[0]
......
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