Skip to content

Commit 30fecce

Browse files
committed
disable tests on Informix
1 parent a0d2b2f commit 30fecce

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaMultiselectGroupByAndOrderByTest.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.ArrayList;
99
import java.util.List;
1010

11+
import org.hibernate.community.dialect.InformixDialect;
1112
import org.hibernate.dialect.SybaseASEDialect;
1213
import org.hibernate.query.criteria.HibernateCriteriaBuilder;
1314
import org.hibernate.query.criteria.JpaCriteriaQuery;
@@ -19,8 +20,8 @@
1920
import org.hibernate.testing.orm.junit.SessionFactory;
2021
import org.hibernate.testing.orm.junit.SessionFactoryScope;
2122
import org.hibernate.testing.orm.junit.SkipForDialect;
22-
import org.junit.jupiter.api.AfterAll;
23-
import org.junit.jupiter.api.BeforeAll;
23+
import org.junit.jupiter.api.AfterEach;
24+
import org.junit.jupiter.api.BeforeEach;
2425
import org.junit.jupiter.api.Test;
2526

2627
import jakarta.persistence.Entity;
@@ -47,7 +48,7 @@
4748
} )
4849
@SessionFactory
4950
public class CriteriaMultiselectGroupByAndOrderByTest {
50-
@BeforeAll
51+
@BeforeEach
5152
public void setUp(SessionFactoryScope scope) {
5253
scope.inTransaction( session -> {
5354
final Secondary secondaryA = new Secondary( 1, "a" );
@@ -69,12 +70,9 @@ public void setUp(SessionFactoryScope scope) {
6970
} );
7071
}
7172

72-
@AfterAll
73+
@AfterEach
7374
public void tearDown(SessionFactoryScope scope) {
74-
scope.inTransaction( session -> {
75-
session.createMutationQuery( "delete from Primary" ).executeUpdate();
76-
session.createMutationQuery( "delete from Secondary" ).executeUpdate();
77-
} );
75+
scope.getSessionFactory().getSchemaManager().truncate();
7876
}
7977

8078
@Test
@@ -129,14 +127,20 @@ public void testSubqueryGroupBy(SessionFactoryScope scope) {
129127

130128
@Test
131129
@Jira( "https://hibernate.atlassian.net/browse/HHH-17231" )
132-
@SkipForDialect( dialectClass = SybaseASEDialect.class, reason = "Sybase doesn't support order by + offset in subqueries")
130+
@SkipForDialect( dialectClass = SybaseASEDialect.class,
131+
reason = "Sybase doesn't support order by + offset in subqueries")
132+
@SkipForDialect( dialectClass = InformixDialect.class,
133+
reason = "Informix doesn't support offset in subqueries")
133134
public void testSubqueryGroupByAndOrderBy(SessionFactoryScope scope) {
134135
executeSubquery( scope, true, false );
135136
}
136137

137138
@Test
138139
@Jira( "https://hibernate.atlassian.net/browse/HHH-17231" )
139-
@SkipForDialect( dialectClass = SybaseASEDialect.class, reason = "Sybase doesn't support order by + offset in subqueries")
140+
@SkipForDialect( dialectClass = SybaseASEDialect.class,
141+
reason = "Sybase doesn't support order by + offset in subqueries")
142+
@SkipForDialect( dialectClass = InformixDialect.class,
143+
reason = "Informix doesn't support offset in subqueries")
140144
public void testSubqueryGroupByAndOrderByAndHaving(SessionFactoryScope scope) {
141145
executeSubquery( scope, true, true );
142146
}

0 commit comments

Comments
 (0)