diff --git a/src/test/java/redis/clients/jedis/tests/commands/ControlCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/ControlCommandsTest.java index 832cd6c..bba56c1 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/ControlCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/ControlCommandsTest.java @@ -61,6 +61,11 @@ public class ControlCommandsTest extends JedisCommandTestBase { public void monitor() { new Thread(new Runnable() { public void run() { + try { + // sleep 100ms to make sure that monitor thread runs first + Thread.sleep(100); + } catch (InterruptedException e) { + } Jedis j = new Jedis("localhost"); j.auth("foobared"); for (int i = 0; i < 5; i++) {