Commit a1883c47 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Check that clients are forgotten when master fall to verification.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2073 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 176942c6
......@@ -380,6 +380,9 @@ class NEOCluster(object):
def getStorageList(self, state=None):
return self.__getNodeList(NodeTypes.STORAGE, state)
def getClientlist(self, state=None):
return self.__getNodeList(NodeTypes.CLIENT, state)
def __getNodeState(self, node_type, uuid):
node_list = self.__getNodeList(node_type)
for node_type, address, node_uuid, state in node_list:
......
......@@ -226,11 +226,20 @@ class StorageTests(NEOFunctionalTest):
(started, _) = self.__setup(replicas=0, storage_number=1)
self.__expectRunning(started[0])
self.neo.expectOudatedCells(number=0)
# add a client node
db, conn = self.neo.getZODBConnection()
root = conn.root()['test'] = 'ok'
transaction.commit()
self.assertEqual(len(self.neo.getClientlist()), 1)
# stop it, the cluster must switch to verification
started[0].stop()
self.__expectUnavailable(started[0])
self.neo.expectClusterVeryfing()
# client must have been disconnected
self.assertEqual(len(self.neo.getClientlist()), 0)
conn.close()
db.close()
# restart it, the cluster must come back to running state
started[0].start()
......
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