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 ...@@ -29,7 +29,7 @@ import traceback
import threading import threading
from neo.neoctl.neoctl import NeoCTL, NotReadyException 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.util import dump
from neo.tests import DB_ADMIN, DB_PASSWD from neo.tests import DB_ADMIN, DB_PASSWD
from neo.client.Storage import Storage from neo.client.Storage import Storage
...@@ -304,6 +304,8 @@ class NEOCluster(object): ...@@ -304,6 +304,8 @@ class NEOCluster(object):
time.sleep(0.5) time.sleep(0.5)
if time.time() > end_time: if time.time() > end_time:
raise AssertionError, 'Timeout when starting cluster' raise AssertionError, 'Timeout when starting cluster'
if storage_node_list:
self.expectClusterRunning()
neoctl.enableStorageList([x[2] for x in storage_node_list]) neoctl.enableStorageList([x[2] for x in storage_node_list])
def stop(self): 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