Tests: re-enable SearchQueryIT#testIndicesQuerySkipParsing and fixing exception message

This commit is contained in:
Christoph Büscher 2015-09-14 22:41:37 +02:00
parent 90f24c1a79
commit 01ea42619a
2 changed files with 2 additions and 3 deletions

View File

@ -211,7 +211,7 @@ public class HasChildQueryBuilder extends AbstractQueryBuilder<HasChildQueryBuil
DocumentMapper childDocMapper = context.mapperService().documentMapper(type);
if (childDocMapper == null) {
throw new QueryShardException(context, "[" + NAME + "] no mapping for for type [" + type + "]");
throw new QueryShardException(context, "[" + NAME + "] no mapping found for type [" + type + "]");
}
ParentFieldMapper parentFieldMapper = childDocMapper.parentFieldMapper();
if (parentFieldMapper.active() == false) {

View File

@ -1890,7 +1890,6 @@ public class SearchQueryIT extends ESIntegTestCase {
assertFirstHit(searchResponse, hasId("1"));
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/12822")
@Test // https://github.com/elasticsearch/elasticsearch/issues/2416
public void testIndicesQuerySkipParsing() throws Exception {
createIndex("simple");
@ -1911,7 +1910,7 @@ public class SearchQueryIT extends ESIntegTestCase {
} catch (SearchPhaseExecutionException e) {
assertThat(e.shardFailures().length, greaterThan(0));
for (ShardSearchFailure shardSearchFailure : e.shardFailures()) {
assertThat(shardSearchFailure.reason(), containsString("No mapping for for type [child]"));
assertThat(shardSearchFailure.reason(), containsString("no mapping found for type [child]"));
}
}