Fix #2123
This commit is contained in:
parent
38644f5e73
commit
a32a4f780c
@ -58,8 +58,6 @@ public class UtilAndComs {
|
||||
.availableProcessors() > 1 ? Runtime.getRuntime().availableProcessors() / 2
|
||||
: 1;
|
||||
|
||||
public static final int DEFAULT_RESEND_BEAT_INTERVAL_SECONDS = 2;
|
||||
|
||||
public static final String HTTP = "http://";
|
||||
|
||||
public static final String HTTPS = "https://";
|
||||
|
@ -267,9 +267,7 @@ public class InstanceController {
|
||||
}
|
||||
|
||||
if (clientBeat != null) {
|
||||
if (StringUtils.isBlank(clientBeat.getCluster())) {
|
||||
clientBeat.setCluster(UtilsAndCommons.DEFAULT_CLUSTER_NAME);
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(clientBeat.getCluster())) {
|
||||
clusterName = clientBeat.getCluster();
|
||||
}
|
||||
ip = clientBeat.getIp();
|
||||
@ -311,10 +309,8 @@ public class InstanceController {
|
||||
clientBeat.setIp(ip);
|
||||
clientBeat.setPort(port);
|
||||
clientBeat.setCluster(clusterName);
|
||||
service.processClientBeat(clientBeat);
|
||||
} else {
|
||||
service.processClientBeat(clientBeat);
|
||||
}
|
||||
service.processClientBeat(clientBeat);
|
||||
|
||||
result.put(CommonParams.CODE, NamingResponseCode.OK);
|
||||
result.put("clientBeatInterval", instance.getInstanceHeartBeatInterval());
|
||||
|
@ -202,8 +202,6 @@ public class AutoDeregisterInstance_ITCase {
|
||||
|
||||
String serviceName = randomDomainName();
|
||||
|
||||
System.out.println(serviceName);
|
||||
|
||||
naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1");
|
||||
naming.registerInstance(serviceName, "127.0.0.2", TEST_PORT, "c2");
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class ClientBeat_ITCase extends NamingBase {
|
||||
}
|
||||
}
|
||||
|
||||
// Sleep 30 seconds and see if instance list not changed:
|
||||
// Sleep 35 seconds and see if instance list not changed:
|
||||
TimeUnit.SECONDS.sleep(35L);
|
||||
|
||||
list = naming.getAllInstances(serviceName);
|
||||
@ -114,7 +114,7 @@ public class ClientBeat_ITCase extends NamingBase {
|
||||
|
||||
Assert.assertTrue(response.getStatusCode().is2xxSuccessful());
|
||||
|
||||
// Sleep 30 seconds and see if instance list not changed:
|
||||
// Sleep 35 seconds and see if instance list not changed:
|
||||
TimeUnit.SECONDS.sleep(35L);
|
||||
|
||||
list = naming.getAllInstances(serviceName);
|
||||
|
Loading…
Reference in New Issue
Block a user