HHH-18168 Skip test for older Informix

This commit is contained in:
Vladimír Kuruc 2024-11-29 13:10:38 +01:00 committed by Christian Beikov
parent a23096484f
commit 46b3b3a2d2
1 changed files with 15 additions and 11 deletions

View File

@ -747,6 +747,7 @@ public class ASTParserLoadingTest {
@Test
@JiraKey(value = "HHH-4150")
@SkipForDialect( dialectClass = InformixDialect.class, majorVersion = 11, minorVersion = 70, reason = "Informix does not support case with count distinct")
public void testSelectClauseCaseWithCountDistinct(SessionFactoryScope scope) {
scope.inTransaction(
session -> {
@ -3643,7 +3644,9 @@ public class ASTParserLoadingTest {
hql = "select length(a.description) from Animal a";
session.createQuery( hql ).list();
if ( !( getDialect() instanceof InformixDialect && getDialect().getVersion().isBefore( 12 ) ) ) {
Dialect dialect = session.getDialect();
// Informix before version 12 didn't support finding the index of substrings
if ( !(dialect instanceof InformixDialect && dialect.getVersion().isBefore( 12 )) ) {
//note: postgres and db2 don't have a 3-arg form, it gets transformed to 2-args
hql = "from Animal a where locate('abc', a.description, 2) = 2";
session.createQuery( hql ).list();
@ -3655,7 +3658,7 @@ public class ASTParserLoadingTest {
session.createQuery( hql ).list();
}
if ( !(session.getDialect() instanceof DB2Dialect) ) {
if ( !(dialect instanceof DB2Dialect) ) {
hql = "from Animal a where trim(trailing '_' from a.description) = 'cat'";
session.createQuery( hql ).list();
@ -3669,7 +3672,7 @@ public class ASTParserLoadingTest {
session.createQuery( hql ).list();
}
if ( !(session.getDialect() instanceof HSQLDialect) ) { //HSQL doesn't like trim() without specification
if ( !(dialect instanceof HSQLDialect) ) { //HSQL doesn't like trim() without specification
hql = "from Animal a where trim(a.description) = 'cat'";
session.createQuery( hql ).list();
}
@ -3728,6 +3731,7 @@ public class ASTParserLoadingTest {
}
}
@Test
@RequiresDialectFeature(
feature = DialectFeatureChecks.SupportSubqueryAsLeftHandSideInPredicate.class,
comment = "Database does not support using subquery as singular value expression"