Skip to content

Commit 465428a

Browse files
committed
HHH-18168 Skip test for older Informix
1 parent d166950 commit 465428a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -926,12 +926,20 @@ public void testSelectClauseCaseWithCountDistinct() {
926926

927927
s.flush();
928928

929-
Number count = (Number) s.createQuery( "select count(distinct case when bodyWeight > 100 then description else null end) from Human" ).uniqueResult();
930-
assertEquals( 1, count.intValue() );
931-
count = (Number) s.createQuery( "select count(case when bodyWeight > 100 then description else null end) from Human" ).uniqueResult();
932-
assertEquals( 2, count.intValue() );
933-
count = (Number) s.createQuery( "select count(distinct case when bodyWeight > 100 then nickName else null end) from Human" ).uniqueResult();
934-
assertEquals( 2, count.intValue() );
929+
if ( !( getDialect() instanceof InformixDialect && getDialect().getVersion().isBefore( 11, 70 ) ) ) {
930+
Number count = (Number) s.createQuery(
931+
"select count(distinct case when bodyWeight > 100 then description else null end) from Human" )
932+
.uniqueResult();
933+
assertEquals( 1, count.intValue() );
934+
count = (Number) s.createQuery(
935+
"select count(case when bodyWeight > 100 then description else null end) from Human" )
936+
.uniqueResult();
937+
assertEquals( 2, count.intValue() );
938+
count = (Number) s.createQuery(
939+
"select count(distinct case when bodyWeight > 100 then nickName else null end) from Human" )
940+
.uniqueResult();
941+
assertEquals( 2, count.intValue() );
942+
}
935943

936944
t.rollback();
937945
s.close();

0 commit comments

Comments
 (0)