@Override public void execute() { System.out.println("checking on 40s"); Preconditions.checkState(Boolean.FALSE.equals(registry.isLeaseExpirationEnabled()), "Lease expiration should be disabled"); Preconditions.checkState(registry.getNumOfRenewsInLastMin() == 0, "Renewals in last min should be 0"); Preconditions.checkState(registry.getApplication(LOCAL_REGION_APP_NAME).getInstances().size() == 50, "There should be 50 instances in application - MYLOCAPP"); } }),
@Override public void execute() { System.out.println("checking on 80s"); Preconditions.checkState(Boolean.TRUE.equals(registry.isLeaseExpirationEnabled()), "Lease expiration should be enabled"); Preconditions.checkState(registry.getNumOfRenewsInLastMin() == 90, "Renewals in last min should be 90"); Preconditions.checkState(registry.getApplication(LOCAL_REGION_APP_NAME).getInstances().size() == 45, "There should be 45 instances in application - MYLOCAPP"); } }),
@Override public void execute() { System.out.println("checking on 120s"); System.out.println("getNumOfRenewsPerMinThreshold=" + registry.getNumOfRenewsPerMinThreshold()); Preconditions.checkState(registry.getNumOfRenewsPerMinThreshold() == 256, "NumOfRenewsPerMinThreshold should be updated to 256"); Preconditions.checkState(registry.getApplication(LOCAL_REGION_APP_NAME).getInstances().size() == 45, "There should be 45 instances in application - MYLOCAPP"); } })
protected void verifyLocalInstanceStatus(String id, InstanceInfo.InstanceStatus status) { InstanceInfo instanceInfo = registry.getApplication(LOCAL_REGION_APP_NAME).getByInstanceId(id); assertThat("InstanceInfo with id " + id + " not found", instanceInfo, is(notNullValue())); assertThat("Invalid InstanceInfo state", instanceInfo.getStatus(), is(equalTo(status))); }
@Override public void execute() { System.out.println(String.format("isLeaseExpirationEnabled=%s, getNumOfRenewsInLastMin=%d, " + "getNumOfRenewsPerMinThreshold=%s, instanceNumberOfMYLOCALAPP=%d", registry.isLeaseExpirationEnabled(), registry.getNumOfRenewsInLastMin(), registry.getNumOfRenewsPerMinThreshold(), registry.getApplication(LOCAL_REGION_APP_NAME).getInstances().size())); } })
String peerHostName = null; try { Application eurekaApps = this.getApplication(applicationInfoManager.getInfo().getAppName(), false); if (eurekaApps == null) { areAllPeerNodesPrimed = true;
String peerHostName = null; try { Application eurekaApps = this.getApplication(applicationInfoManager.getInfo().getAppName(), false); if (eurekaApps == null) { areAllPeerNodesPrimed = true;