infinispan/infinispan — pull request #1671 by danberindei (2013-02-19 10:57:37+00:00)
Title: ISPN-2781 NPE in AbstractTopologyAwareEncoder1x

Please merge `t_2781_52` into `5.2.x` as well.

https://issues.jboss.org/browse/ISPN-2781

Copy the address cache into a regular map before generating the
topology response, to protect from changes from other threads.

Send topology responses even if not all CH members are in the
address cache. This allows the client to remove leaving HotRod
servers from its CH.

Also ISPN-2746 testDistributedPutWithTopologyChanges test randomly fails on all environments
https://issues.jboss.org/browse/ISPN-2746

The test wasn't properly waiting for the rebalance to end on the
servers before checking the topology id.