[HHH-13912] AssertionError exception is thrown by SqlFunctionMetadataBuilderContributorIllegalClassArgumentTest when executing on IBM JDK 8

This commit is contained in:
lvydra 2024-02-02 10:18:24 +01:00 committed by Christian Beikov
parent 7fc829d9e8
commit 94c13058ac
1 changed files with 7 additions and 1 deletions

View File

@ -35,7 +35,13 @@ public class SqlFunctionMetadataBuilderContributorIllegalClassArgumentTest
fail("Should throw exception!");
}
catch (ClassCastException e) {
assertTrue( e.getMessage().contains( "cannot be cast to" ) );
final String javaVendor = System.getProperty("java.vendor");
if (javaVendor != null && javaVendor.startsWith("IBM")) {
assertTrue( e.getMessage().contains( "incompatible with" ) );
} else {
assertTrue( e.getMessage().contains( "cannot be cast to" ) );
}
assertTrue( e.getMessage().contains( "org.hibernate.boot.spi.MetadataBuilderContributor" ) );
}
}