From 95b2a798bbcafc35de4dba69129f902a5d470d40 Mon Sep 17 00:00:00 2001 From: Henning Andersen <33268011+henningandersen@users.noreply.github.com> Date: Wed, 8 Jan 2020 18:33:02 +0100 Subject: [PATCH] ElasticSearchExceptionTests guessRootCauses fix (#50752) 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;