Merge pull request #362 from basho/adt-cluster-of-one

Fix building clusters of one node
This commit is contained in:
Engel Sanchez 2013-09-06 06:50:19 -07:00
commit fb3191c7cd

View File

@ -768,9 +768,16 @@ build_cluster(NumNodes, Versions, InitialConfig) ->
%% Join nodes
[Node1|OtherNodes] = Nodes,
case OtherNodes of
[] ->
%% no other nodes, nothing to join/plan/commit
ok;
_ ->
%% ok do a staged join and then commit it, this eliminates the
%% large amount of redundant handoff done in a sequential join
[staged_join(Node, Node1) || Node <- OtherNodes],
plan_and_commit(Node1),
plan_and_commit(Node1)
end,
?assertEqual(ok, wait_until_nodes_ready(Nodes)),