remove unnecessary wildcards

Original commit: elastic/x-pack-elasticsearch@65bad879f6
This commit is contained in:
jaymode 2015-10-26 15:36:33 -04:00
parent 09990dbeee
commit 6a46660d40
1 changed files with 2 additions and 10 deletions

View File

@ -44,7 +44,7 @@ public class MarvelClusterInfoIT extends ESIntegTestCase {
final String clusterUUID = client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID(); final String clusterUUID = client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID();
assertTrue(Strings.hasText(clusterUUID)); assertTrue(Strings.hasText(clusterUUID));
awaitIndexExists(".marvel-es-data"); awaitIndexExists(".marvel-es-data");
ensureMarvelIndicesGreen(); ensureGreen(".marvel-es-data");
awaitMarvelDocsCount(equalTo(1L), "cluster_info"); awaitMarvelDocsCount(equalTo(1L), "cluster_info");
GetResponse response = client().prepareGet(".marvel-es-data", "cluster_info", clusterUUID).get(); GetResponse response = client().prepareGet(".marvel-es-data", "cluster_info", clusterUUID).get();
assertTrue(".marvel-es-data" + " document does not exist", response.isExists()); assertTrue(".marvel-es-data" + " document does not exist", response.isExists());
@ -56,14 +56,6 @@ public class MarvelClusterInfoIT extends ESIntegTestCase {
assertThat(licenseObj, nullValue()); assertThat(licenseObj, nullValue());
} }
protected void ensureMarvelIndicesGreen() {
try {
ensureGreen(".marvel-es-*");
} catch (IndexNotFoundException e) {
// might happen with shield...
}
}
protected void awaitMarvelDocsCount(Matcher<Long> matcher, String... types) throws Exception { protected void awaitMarvelDocsCount(Matcher<Long> matcher, String... types) throws Exception {
flush(); flush();
refresh(); refresh();
@ -77,7 +69,7 @@ public class MarvelClusterInfoIT extends ESIntegTestCase {
protected void assertMarvelDocsCount(Matcher<Long> matcher, String... types) { protected void assertMarvelDocsCount(Matcher<Long> matcher, String... types) {
try { try {
long count = client().prepareSearch(".marvel-es-*").setSize(0) long count = client().prepareSearch(".marvel-es-data").setSize(0)
.setTypes(types).get().getHits().totalHits(); .setTypes(types).get().getHits().totalHits();
logger.trace("--> searched for [{}] documents, found [{}]", Strings.arrayToCommaDelimitedString(types), count); logger.trace("--> searched for [{}] documents, found [{}]", Strings.arrayToCommaDelimitedString(types), count);
assertThat(count, matcher); assertThat(count, matcher);