{
fail("Thre is a leak on ClusteredConnectionFactory");
}
}
ClientClusteredConnectionFactoryDelegate cfDelegate = (ClientClusteredConnectionFactoryDelegate)cf.getDelegate();
log.info("(Before)Server0 - " + getCountOnServer(0, cfDelegate.getUniqueName()));
log.info("(Before)Server1 - " + getCountOnServer(1, cfDelegate.getUniqueName()));
assertEquals(1, getCountOnServer(0, cfDelegate.getUniqueName()));
assertEquals(1, getCountOnServer(1, cfDelegate.getUniqueName()));
cfDelegate.closeCallback();
// Validates if closeCallback is working
assertEquals(0, getCountOnServer(0, cfDelegate.getUniqueName()));
assertEquals(0, getCountOnServer(1, cfDelegate.getUniqueName()));
ClusterClientCrash command = new ClusterClientCrash(cf);
assertEquals("OK", remoteServer.executeCommand(command));
assertEquals(new Integer(1),ServerManagement.getServer(1).executeCommand(new VerifySizeOfCFClients(cfDelegate.getUniqueName())));
ServerManagement.kill(2);
Thread.sleep((long)(60000));
assertEquals(0, getCountOnServer(1, cfDelegate.getUniqueName()));
assertEquals(0, getCountOnServer(0, cfDelegate.getUniqueName()));
}