Adapt tests to MappingException cause when entity creation fails.

Closes #3167
This commit is contained in:
Mark Paluch 2025-09-09 15:33:41 +02:00
parent 087f3a80c5
commit b49fedaafc
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973

View File

@ -190,7 +190,7 @@ public class SimpleElasticsearchPersistentPropertyUnitTests {
void shouldRequirePatternForCustomDateFormat() {
assertThatExceptionOfType(MappingException.class) //
.isThrownBy(() -> context.getRequiredPersistentEntity(DateFieldWithCustomFormatAndNoPattern.class)) //
.withMessageContaining("pattern");
.havingRootCause().withMessageContaining("pattern");
}
@Test // #1565