Merge pull request #16390 from talevy/fix_ingest_client_test

fix ingest client put error test
This commit is contained in:
Tal Levy 2016-02-02 15:26:58 -08:00
commit 99cf7de514
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,7 @@
package org.elasticsearch.ingest; package org.elasticsearch.ingest;
import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.action.bulk.BulkItemResponse;
import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.bulk.BulkResponse;
@ -219,7 +220,9 @@ public class IngestClientIT extends ESIntegTestCase {
try { try {
client().admin().cluster().putPipeline(putPipelineRequest).get(); client().admin().cluster().putPipeline(putPipelineRequest).get();
} catch (ExecutionException e) { } catch (ExecutionException e) {
assertThat(e.getCause().getCause().getMessage(), equalTo("processor [test] doesn't support one or more provided configuration parameters [unused]")); ElasticsearchParseException ex = (ElasticsearchParseException) ExceptionsHelper.unwrap(e, ElasticsearchParseException.class);
assertNotNull(ex);
assertThat(ex.getMessage(), equalTo("processor [test] doesn't support one or more provided configuration parameters [unused]"));
} }
} }