...
|
...
|
@@ -263,7 +263,7 @@ public class RedisTask extends Task { |
|
|
}
|
|
|
|
|
|
|
|
|
private boolean testRedis(RedisInfo info) throws InterruptedException {
|
|
|
private boolean testRedis(RedisInfo info) throws Exception {
|
|
|
|
|
|
String testKey = "test" + info.getIp() + ":" + info.getPort();
|
|
|
|
...
|
...
|
@@ -275,6 +275,8 @@ public class RedisTask extends Task { |
|
|
//写主 读主
|
|
|
client.set(testKey.getBytes(), testValue.getBytes());
|
|
|
|
|
|
Thread.sleep(1000);
|
|
|
|
|
|
String testResult = new String(client.get(testKey.getBytes()));
|
|
|
|
|
|
if (StringUtils.equals(testValue, testResult)) {
|
...
|
...
|
|