From ccf93714e67057a1b8951713ec1986d236e4fe06 Mon Sep 17 00:00:00 2001 From: Marcos Nils Date: Tue, 14 Jan 2014 17:58:21 -0300 Subject: [PATCH] Fix ClusterCommand tearDown as gossip may take some time to send data to nodes --- .../clients/jedis/tests/commands/ClusterCommandsTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/redis/clients/jedis/tests/commands/ClusterCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/ClusterCommandsTest.java index 8de59a7..a7045a6 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/ClusterCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/ClusterCommandsTest.java @@ -9,6 +9,7 @@ import org.junit.Test; import redis.clients.jedis.HostAndPort; import redis.clients.jedis.Jedis; +import redis.clients.jedis.exceptions.JedisDataException; import redis.clients.jedis.tests.HostAndPortUtil; import redis.clients.jedis.tests.JedisTestBase; @@ -48,6 +49,11 @@ public class ClusterCommandsTest extends JedisTestBase { node1.clusterDelSlots(5000, 10000); node1.clusterDelSlots(6000); node2.clusterDelSlots(6000,1,2,3,4,5,500,5000); + try { + node2.clusterDelSlots(10000); + } catch (JedisDataException jde) { + //Do nothing, slot may or may not be assigned depending on gossip + } } private static void waitForEqualClusterSize() throws InterruptedException {