use of org.apache.servicecomb.registry.api.registry.HealthCheck in project java-chassis by ServiceComb.
the class TestMicroserviceInstanceRegisterTask method setup.
@Before
public void setup() {
ConfigUtil.installDynamicConfig();
eventBus = new EventBus();
taskList = new ArrayList<>();
eventBus.register(new Object() {
@Subscribe
public void onEvent(MicroserviceInstanceRegisterTask task) {
taskList.add(task);
}
});
microservice = new Microservice();
microservice.setAppId("app");
microservice.setServiceName("ms");
microservice.setServiceId("serviceId");
microservice.setInstance(new MicroserviceInstance());
HealthCheck healthCheck = new HealthCheck();
healthCheck.setMode(HealthCheckMode.HEARTBEAT);
microservice.getInstance().setHealthCheck(healthCheck);
}
Aggregations