|
|
|
@ -4,6 +4,7 @@ import com.xxl.job.core.biz.AdminBiz;
|
|
|
|
|
import com.xxl.job.core.biz.model.RegistryParam;
|
|
|
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
|
|
|
import com.xxl.job.core.enums.RegistryConfig;
|
|
|
|
|
import com.xxl.rpc.remoting.invoker.XxlRpcInvokerFactory;
|
|
|
|
|
import com.xxl.rpc.remoting.invoker.call.CallType;
|
|
|
|
|
import com.xxl.rpc.remoting.invoker.reference.XxlRpcReferenceBean;
|
|
|
|
|
import com.xxl.rpc.remoting.invoker.route.LoadBalance;
|
|
|
|
@ -48,6 +49,9 @@ public class AdminBizTest {
|
|
|
|
|
RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "xxl-job-executor-example", "127.0.0.1:9999");
|
|
|
|
|
ReturnT<String> returnT = adminBiz.registry(registryParam);
|
|
|
|
|
Assert.assertTrue(returnT.getCode() == ReturnT.SUCCESS_CODE);
|
|
|
|
|
|
|
|
|
|
// stop invoker
|
|
|
|
|
XxlRpcInvokerFactory.getInstance().stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -75,6 +79,9 @@ public class AdminBizTest {
|
|
|
|
|
RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "xxl-job-executor-example", "127.0.0.1:9999");
|
|
|
|
|
ReturnT<String> returnT = adminBiz.registryRemove(registryParam);
|
|
|
|
|
Assert.assertTrue(returnT.getCode() == ReturnT.SUCCESS_CODE);
|
|
|
|
|
|
|
|
|
|
// stop invoker
|
|
|
|
|
XxlRpcInvokerFactory.getInstance().stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|