@@ -0,0 +1,1215 @@
+package cn.zxl.deerlet.redis.client.strategy;%0A%0Aimport cn.zxl.deerlet.redis.client.config.Servers;%0Aimport cn.zxl.deerlet.redis.client.connection.ConnectionPool;%0Aimport cn.zxl.deerlet.redis.client.connection.impl.ConnectionPoolImpl;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.UUID;%0A%0A/**%0A * %3Cp%3E%0A * %3Cp/%3E%0A * %3C/p%3E%0A *%0A * @author %E5%B7%A6%E6%BD%87%E9%BE%99%0A * @since 4/27/2015 5:30 PM%0A */%0Apublic class ConsistencyHashTest %7B%0A%0A    @Test%0A    public void testConsistencyHash() %7B%0A        List%3CConnectionPool%3E nodes = new ArrayList%3CConnectionPool%3E();%0A        nodes.add(new ConnectionPoolImpl(Servers.newServer(%22localhost%22, 6379),10,20,10,20));%0A        nodes.add(new ConnectionPoolImpl(Servers.newServer(%22localhost%22, 6379),10,20,10,20));%0A        LoadBalanceStrategy%3CConnectionPool%3E loadBalanceStrategy = new ConsistencyHashStrategy%3CConnectionPool%3E(nodes);%0A        for (int j = 0 ; j %3C 1000000; j++) %7B%0A            String key = UUID.randomUUID().toString();%0A            ConnectionPool node = loadBalanceStrategy.select(key);%0A            for (int i = 0 ; i %3C 1000 ; i++) %7B%0A                Assert.assertEquals(node, loadBalanceStrategy.select(key));%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

修复rename以及renameXX命令的bug。