use of com.netflix.appinfo.InstanceInfo in project eureka by Netflix.
the class BaseDiscoveryClientTester method setupDiscoveryClient.
protected void setupDiscoveryClient(int renewalIntervalInSecs) {
InstanceInfo instanceInfo = newInstanceInfoBuilder(renewalIntervalInSecs).build();
client = DiscoveryClientResource.setupDiscoveryClient(instanceInfo);
}
use of com.netflix.appinfo.InstanceInfo in project eureka by Netflix.
the class BaseDiscoveryClientTester method createLocalApps.
protected static List<Application> createLocalApps() {
Application myapp1 = new Application(LOCAL_REGION_APP1_NAME);
InstanceInfo instanceInfo1 = createInstance(LOCAL_REGION_APP1_NAME, ALL_REGIONS_VIP1_ADDR, LOCAL_REGION_APP1_INSTANCE1_HOSTNAME, null);
myapp1.addInstance(instanceInfo1);
Application myapp2 = new Application(LOCAL_REGION_APP2_NAME);
InstanceInfo instanceInfo2 = createInstance(LOCAL_REGION_APP2_NAME, ALL_REGIONS_VIP2_ADDR, LOCAL_REGION_APP2_INSTANCE1_HOSTNAME, null);
myapp2.addInstance(instanceInfo2);
return Arrays.asList(myapp1, myapp2);
}
use of com.netflix.appinfo.InstanceInfo in project eureka by Netflix.
the class BaseDiscoveryClientTester method createRemoteApps.
protected static List<Application> createRemoteApps() {
Application myapp1 = new Application(REMOTE_REGION_APP1_NAME);
InstanceInfo instanceInfo1 = createInstance(REMOTE_REGION_APP1_NAME, ALL_REGIONS_VIP1_ADDR, REMOTE_REGION_APP1_INSTANCE1_HOSTNAME, REMOTE_ZONE);
myapp1.addInstance(instanceInfo1);
Application myapp2 = new Application(REMOTE_REGION_APP2_NAME);
InstanceInfo instanceInfo2 = createInstance(REMOTE_REGION_APP2_NAME, ALL_REGIONS_VIP2_ADDR, REMOTE_REGION_APP2_INSTANCE1_HOSTNAME, REMOTE_ZONE);
myapp2.addInstance(instanceInfo2);
return Arrays.asList(myapp1, myapp2);
}
use of com.netflix.appinfo.InstanceInfo in project eureka by Netflix.
the class BaseDiscoveryClientTester method createLocalAppsDelta.
protected static List<Application> createLocalAppsDelta() {
Application myapp1 = new Application(LOCAL_REGION_APP1_NAME);
InstanceInfo instanceInfo1 = createInstance(LOCAL_REGION_APP1_NAME, ALL_REGIONS_VIP1_ADDR, LOCAL_REGION_APP1_INSTANCE2_HOSTNAME, null);
instanceInfo1.setActionType(InstanceInfo.ActionType.ADDED);
myapp1.addInstance(instanceInfo1);
Application myapp2 = new Application(LOCAL_REGION_APP2_NAME);
InstanceInfo instanceInfo2 = createInstance(LOCAL_REGION_APP2_NAME, ALL_REGIONS_VIP2_ADDR, LOCAL_REGION_APP2_INSTANCE2_HOSTNAME, null);
instanceInfo2.setActionType(InstanceInfo.ActionType.ADDED);
myapp2.addInstance(instanceInfo2);
return Arrays.asList(myapp1, myapp2);
}
use of com.netflix.appinfo.InstanceInfo in project eureka by Netflix.
the class BaseDiscoveryClientTester method addLocalAppDelta.
protected void addLocalAppDelta() {
Application myappDelta = new Application(LOCAL_REGION_APP3_NAME);
InstanceInfo instanceInfo = createInstance(LOCAL_REGION_APP3_NAME, ALL_REGIONS_VIP3_ADDR, LOCAL_REGION_APP3_INSTANCE1_HOSTNAME, null);
instanceInfo.setActionType(InstanceInfo.ActionType.ADDED);
myappDelta.addInstance(instanceInfo);
mockLocalEurekaServer.addLocalRegionAppsDelta(LOCAL_REGION_APP3_NAME, myappDelta);
}
Aggregations