Commit 8df16259 authored by Vincent Pelletier's avatar Vincent Pelletier

Make sure this loop is executed at least once.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2380 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bcbcc2f5
......@@ -294,8 +294,6 @@ class NEOCluster(object):
target_count = len(self.db_list) - len(except_storages)
end_time = time.time() + MAX_START_TIME
while True:
if time.time() > end_time:
raise AssertionError, 'Timeout when starting cluster'
storage_node_list = neoctl.getNodeList(
node_type=NodeTypes.STORAGE)
# wait at least number of started storages, admin node can know
......@@ -304,6 +302,8 @@ class NEOCluster(object):
if len(storage_node_list) >= target_count:
break
time.sleep(0.5)
if time.time() > end_time:
raise AssertionError, 'Timeout when starting cluster'
neoctl.enableStorageList([x[2] for x in storage_node_list])
def stop(self):
......
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