public void testWildcardForPreaggregatedMetric() throws Exception {
testWildcard(TENANT_C, null);
}
public void testWildcard(String tenantId, String unit) throws Exception {
SearchResult entry;
List<SearchResult> results;
results = elasticIO.search(tenantId, "one.two.*");
List<Locator> locators = locatorMap.get(tenantId);
Assert.assertEquals(locators.size(), results.size());
for (Locator locator : locators) {
entry = new SearchResult(tenantId, locator.getMetricName(), unit);
Assert.assertTrue((results.contains(entry)));
}
results = elasticIO.search(tenantId, "*.fourA.*");
Assert.assertEquals(NUM_PARENT_ELEMENTS * NUM_GRANDCHILD_ELEMENTS, results.size());