unmuted scan parse tests and don't be strict when parse the search type. (Watcher fails when it sees scan is being used)
Closes elastic/elasticsearch#484 Original commit: elastic/x-pack-elasticsearch@fea5d6a22d
This commit is contained in:
parent
1177c9ee53
commit
31f3830cf7
|
@ -230,7 +230,7 @@ public final class WatcherUtils {
|
||||||
String typesStr = parser.text();
|
String typesStr = parser.text();
|
||||||
searchRequest.types(Strings.delimitedListToStringArray(typesStr, ",", " \t"));
|
searchRequest.types(Strings.delimitedListToStringArray(typesStr, ",", " \t"));
|
||||||
} else if (ParseFieldMatcher.STRICT.match(currentFieldName, SEARCH_TYPE_FIELD)) {
|
} else if (ParseFieldMatcher.STRICT.match(currentFieldName, SEARCH_TYPE_FIELD)) {
|
||||||
searchType = SearchType.fromString(parser.text().toLowerCase(Locale.ROOT), ParseFieldMatcher.STRICT);
|
searchType = SearchType.fromString(parser.text().toLowerCase(Locale.ROOT), ParseFieldMatcher.EMPTY);
|
||||||
if (searchType == SearchType.SCAN){
|
if (searchType == SearchType.SCAN){
|
||||||
throw new ElasticsearchParseException("could not read search request. value [" + searchType.name() + "] is not supported for field [" + SEARCH_TYPE_FIELD.getPreferredName() + "]" );
|
throw new ElasticsearchParseException("could not read search request. value [" + searchType.name() + "] is not supported for field [" + SEARCH_TYPE_FIELD.getPreferredName() + "]" );
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,7 +315,6 @@ public class SearchInputTests extends ESIntegTestCase {
|
||||||
assertThat(names, arrayContaining("test", "test-" + DateTimeFormat.forPattern(dateFormat).print(now.minusDays(1))));
|
assertThat(names, arrayContaining("test", "test-" + DateTimeFormat.forPattern(dateFormat).print(now.minusDays(1))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/484")
|
|
||||||
@Test(expected = ElasticsearchParseException.class)
|
@Test(expected = ElasticsearchParseException.class)
|
||||||
public void testParser_ScanNotSupported() throws Exception {
|
public void testParser_ScanNotSupported() throws Exception {
|
||||||
SearchRequest request = client().prepareSearch()
|
SearchRequest request = client().prepareSearch()
|
||||||
|
|
|
@ -363,7 +363,6 @@ public class SearchTransformTests extends ESIntegTestCase {
|
||||||
assertThat(names, arrayContaining("idx", "idx-" + DateTimeFormat.forPattern(dateFormat).print(now.minusDays(3))));
|
assertThat(names, arrayContaining("idx", "idx-" + DateTimeFormat.forPattern(dateFormat).print(now.minusDays(3))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/484")
|
|
||||||
@Test(expected = ElasticsearchParseException.class)
|
@Test(expected = ElasticsearchParseException.class)
|
||||||
public void testParser_ScanNotSupported() throws Exception {
|
public void testParser_ScanNotSupported() throws Exception {
|
||||||
SearchRequest request = client().prepareSearch()
|
SearchRequest request = client().prepareSearch()
|
||||||
|
|
Loading…
Reference in New Issue