Fix CI.
This commit is contained in:
parent
62ca37bc8f
commit
4d56a63bd2
|
|
@ -18,16 +18,14 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.cluster.plugin.standalone;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.skywalking.oap.server.core.cluster.ClusterNodesQuery;
|
||||
import org.apache.skywalking.oap.server.core.cluster.ClusterRegister;
|
||||
import org.apache.skywalking.oap.server.core.cluster.RemoteInstance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A cluster manager simulator. Work in memory only.
|
||||
* Also return the current instance.
|
||||
* A cluster manager simulator. Work in memory only. Also return the current instance.
|
||||
*
|
||||
* @author peng-yongsheng, Wu Sheng
|
||||
*/
|
||||
|
|
@ -35,14 +33,13 @@ public class StandaloneManager implements ClusterNodesQuery, ClusterRegister {
|
|||
|
||||
private volatile RemoteInstance remoteInstance;
|
||||
|
||||
|
||||
@Override public void registerRemote(RemoteInstance remoteInstance) {
|
||||
this.remoteInstance = remoteInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RemoteInstance> queryRemoteNodes() {
|
||||
if(remoteInstance == null){
|
||||
if (remoteInstance == null) {
|
||||
return new ArrayList(0);
|
||||
}
|
||||
ArrayList remoteList = new ArrayList(1);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
|||
|
||||
public class StandaloneManagerTest {
|
||||
@Test
|
||||
public void test(){
|
||||
public void test() {
|
||||
StandaloneManager standaloneManager = new StandaloneManager();
|
||||
RemoteInstance remote1 = new RemoteInstance();
|
||||
RemoteInstance remote2 = new RemoteInstance();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class ClusterModuleZookeeperProviderTestCase {
|
|||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
List<RemoteInstance> detailsList = clusterNodesQuery.queryRemoteNodes();
|
||||
if(detailsList.size() == 0){
|
||||
if (detailsList.size() == 0) {
|
||||
Thread.sleep(500);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class CoreModuleProvider extends ModuleProvider {
|
|||
|
||||
}
|
||||
|
||||
@Override public void notifyAfterCompleted() throws ModuleStartException{
|
||||
@Override public void notifyAfterCompleted() throws ModuleStartException {
|
||||
try {
|
||||
grpcServer.start();
|
||||
jettyServer.start();
|
||||
|
|
|
|||
Loading…
Reference in New Issue