From b653e80314e69e4a8e9cf9c0883692dc5b8a096c Mon Sep 17 00:00:00 2001 From: Tal Levy Date: Tue, 2 Feb 2016 14:39:44 -0800 Subject: [PATCH] fix ingest client put error test --- .../test/java/org/elasticsearch/ingest/IngestClientIT.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/ingest/IngestClientIT.java b/core/src/test/java/org/elasticsearch/ingest/IngestClientIT.java index a2995964a0d..e5fcba2a3be 100644 --- a/core/src/test/java/org/elasticsearch/ingest/IngestClientIT.java +++ b/core/src/test/java/org/elasticsearch/ingest/IngestClientIT.java @@ -20,6 +20,7 @@ package org.elasticsearch.ingest; import org.elasticsearch.ElasticsearchParseException; +import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; @@ -219,7 +220,9 @@ public class IngestClientIT extends ESIntegTestCase { try { client().admin().cluster().putPipeline(putPipelineRequest).get(); } 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]")); } }