HHH-18168 Skip test for older Informix
This commit is contained in:
parent
a23096484f
commit
46b3b3a2d2
|
@ -747,6 +747,7 @@ public class ASTParserLoadingTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@JiraKey(value = "HHH-4150")
|
@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) {
|
public void testSelectClauseCaseWithCountDistinct(SessionFactoryScope scope) {
|
||||||
scope.inTransaction(
|
scope.inTransaction(
|
||||||
session -> {
|
session -> {
|
||||||
|
@ -3643,19 +3644,21 @@ public class ASTParserLoadingTest {
|
||||||
hql = "select length(a.description) from Animal a";
|
hql = "select length(a.description) from Animal a";
|
||||||
session.createQuery( hql ).list();
|
session.createQuery( hql ).list();
|
||||||
|
|
||||||
if ( !( getDialect() instanceof InformixDialect && getDialect().getVersion().isBefore( 12 ) ) ) {
|
Dialect dialect = session.getDialect();
|
||||||
//note: postgres and db2 don't have a 3-arg form, it gets transformed to 2-args
|
// Informix before version 12 didn't support finding the index of substrings
|
||||||
hql = "from Animal a where locate('abc', a.description, 2) = 2";
|
if ( !(dialect instanceof InformixDialect && dialect.getVersion().isBefore( 12 )) ) {
|
||||||
session.createQuery( hql ).list();
|
//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();
|
||||||
|
|
||||||
hql = "from Animal a where locate('abc', a.description) = 2";
|
hql = "from Animal a where locate('abc', a.description) = 2";
|
||||||
session.createQuery( hql ).list();
|
session.createQuery( hql ).list();
|
||||||
|
|
||||||
hql = "select locate('cat', a.description, 2) from Animal a";
|
hql = "select locate('cat', a.description, 2) from Animal a";
|
||||||
session.createQuery( hql ).list();
|
session.createQuery( hql ).list();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !(session.getDialect() instanceof DB2Dialect) ) {
|
if ( !(dialect instanceof DB2Dialect) ) {
|
||||||
hql = "from Animal a where trim(trailing '_' from a.description) = 'cat'";
|
hql = "from Animal a where trim(trailing '_' from a.description) = 'cat'";
|
||||||
session.createQuery( hql ).list();
|
session.createQuery( hql ).list();
|
||||||
|
|
||||||
|
@ -3669,7 +3672,7 @@ public class ASTParserLoadingTest {
|
||||||
session.createQuery( hql ).list();
|
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'";
|
hql = "from Animal a where trim(a.description) = 'cat'";
|
||||||
session.createQuery( hql ).list();
|
session.createQuery( hql ).list();
|
||||||
}
|
}
|
||||||
|
@ -3728,6 +3731,7 @@ public class ASTParserLoadingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
@RequiresDialectFeature(
|
@RequiresDialectFeature(
|
||||||
feature = DialectFeatureChecks.SupportSubqueryAsLeftHandSideInPredicate.class,
|
feature = DialectFeatureChecks.SupportSubqueryAsLeftHandSideInPredicate.class,
|
||||||
comment = "Database does not support using subquery as singular value expression"
|
comment = "Database does not support using subquery as singular value expression"
|
||||||
|
|
Loading…
Reference in New Issue