From b49fedaafca4e7aac1276a15dd50418ba5ede105 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 9 Sep 2025 15:33:41 +0200 Subject: [PATCH] Adapt tests to `MappingException` cause when entity creation fails. Closes #3167 --- .../mapping/SimpleElasticsearchPersistentPropertyUnitTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java index ea108a405..21ae5ba76 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java @@ -190,7 +190,7 @@ public class SimpleElasticsearchPersistentPropertyUnitTests { void shouldRequirePatternForCustomDateFormat() { assertThatExceptionOfType(MappingException.class) // .isThrownBy(() -> context.getRequiredPersistentEntity(DateFieldWithCustomFormatAndNoPattern.class)) // - .withMessageContaining("pattern"); + .havingRootCause().withMessageContaining("pattern"); } @Test // #1565