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:
@@ -61,6 +61,11 @@ public class ControlCommandsTest extends JedisCommandTestBase {
|
|||||||
public void monitor() {
|
public void monitor() {
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
public void run() {
|
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");
|
Jedis j = new Jedis("localhost");
|
||||||
j.auth("foobared");
|
j.auth("foobared");
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user