Merge pull request #516 from HeartSaVioR/fix-timing-issues-with-monitor-test

Fix ControlCommandsTest to don't hang from monitor test because of timing issue
This commit is contained in:
Jonathan Leibiusky
2014-01-27 07:11:08 -08:00

View File

@@ -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++) {