private void waitForServerTopology(HornetQServer server, int nodes, int seconds)
throws InterruptedException
{
Topology topology = server.getClusterManager().getTopology();
long timeToWait = System.currentTimeMillis() + (seconds * 1000);
while(topology.nodes()!= nodes)
{
Thread.sleep(100);
if(System.currentTimeMillis() > timeToWait)
{
fail("timed out waiting for server topology");