From c1544dee097b926a66fd364234a4d16aec54c11d Mon Sep 17 00:00:00 2001 From: Henning Andersen Date: Wed, 8 Jan 2020 17:34:41 +0100 Subject: [PATCH] ElasticSearchExceptionTests guessRootCauses fix testFailureToAndFromXContentWithDetails had incorporated that guessRootCauses returned the wrapper when the underlying exception was not an ElasticsearchException, fixed. Relates #50525 --- .../java/org/elasticsearch/ElasticsearchExceptionTests.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java b/server/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java index 570598831f944..52c1bd7a24d24 100644 --- a/server/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java +++ b/server/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java @@ -805,9 +805,7 @@ public void testFailureToAndFromXContentWithDetails() throws IOException { failure = new BroadcastShardOperationFailedException(new ShardId("_index", "_uuid", 5), "F", failureCause); expected = new ElasticsearchException("Elasticsearch exception [type=file_already_exists_exception, reason=File exists]"); - // strangely, the wrapped exception appears as the root cause... - suppressed = new ElasticsearchException("Elasticsearch exception [type=broadcast_shard_operation_failed_exception, " + - "reason=F]"); + suppressed = new ElasticsearchException("Elasticsearch exception [type=file_already_exists_exception, reason=File exists]"); expected.addSuppressed(suppressed); break;