Commit 94192574 authored by Vincent Pelletier's avatar Vincent Pelletier

Wait for cluster running state before adding storage nodes.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2383 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent df6170a5
......@@ -29,7 +29,7 @@ import traceback
import threading
from neo.neoctl.neoctl import NeoCTL, NotReadyException
from neo.protocol import ClusterStates, NodeTypes, CellStates
from neo.protocol import ClusterStates, NodeTypes, CellStates, NodeStates
from neo.util import dump
from neo.tests import DB_ADMIN, DB_PASSWD
from neo.client.Storage import Storage
......@@ -304,7 +304,9 @@ class NEOCluster(object):
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])
if storage_node_list:
self.expectClusterRunning()
neoctl.enableStorageList([x[2] for x in storage_node_list])
def stop(self):
for process_list in self.process_dict.itervalues():
......
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