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:
Martijn van Groningen 2015-08-24 14:03:54 +02:00
parent 1177c9ee53
commit 31f3830cf7
3 changed files with 1 additions and 3 deletions

View File

@ -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() + "]" );
} }

View File

@ -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()

View File

@ -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()