@Test public void testFindInstances_shouldFindWhenDCIsSpecified() throws ExecutionException, InterruptedException { final Set<String> datacenters = ConsulAPI.getCatalog().datacenters().get(); boolean found = false; for (final String dc : datacenters) { final List<ServiceInstance> instances = ConsulAPI.getCatalog().findInstances(SERVICE1_NAME, dc).get(); Assert.assertNotNull(instances); found |= !instances.isEmpty(); } Assert.assertTrue("service wasn't found in all DCs", found); }
public static ConsulCatalog getCatalog() { return ConsulCatalogHolder.INSTANCE; }
ConsulAPI { public static ConsulCatalog getCatalog() { return ConsulCatalogHolder.INSTANCE; } }
ConsulAPI { public static ConsulCatalog getCatalog() { return ConsulCatalogHolder.INSTANCE; }  }
ConsulAPI { public static ConsulCatalog getCatalog() { return ConsulCatalogHolder.INSTANCE; }  static ConsulServiceRegistry getServiceRegistry(); static ConsulServiceRegistry getServiceRegistryV1(); static ConsulCatalog getCatalog(); static ConsulHealth getHealth(); }
ConsulAPI { public static ConsulCatalog getCatalog() { return ConsulCatalogHolder.INSTANCE; }  static ConsulServiceRegistry getServiceRegistry(); static ConsulServiceRegistry getServiceRegistryV1(); static ConsulCatalog getCatalog(); static ConsulHealth getHealth();  }