infinispan/infinispan — pull request #1354 by anistor (2012-10-02 10:13:41+00:00)
Title: ISPN-2358 TestingUtil.waitForRehashToComplete returns too soon and causes random test failures

JIRA: https://issues.jboss.org/browse/ISPN-2358

TestingUtil.waitForRehashToComplete returns as soon as the LocalTopologyManager receives and dispatches the new CacheTopology. This is usually too early because the StateTransferManager and DistributionManager are in the process of being updated. We need to wait until StateTransferManager has finished processing of the new topology.

Currently MultipleNodesLeavingTest is failing randomly because of this.