Skip to content

Commit 7e4df3f

Browse files
committed
HHH-18543 Skip GenericCompositeUserTypeTest for JVM OpenJ9
1 parent 052eb0b commit 7e4df3f

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed
Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
package org.hibernate.orm.test.cut.generic;
22

3-
import org.hibernate.Session;
4-
import org.hibernate.Transaction;
5-
63
import org.hibernate.testing.TestForIssue;
7-
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
8-
import org.junit.Test;
4+
import org.hibernate.testing.orm.junit.DomainModel;
5+
import org.hibernate.testing.orm.junit.SessionFactory;
6+
import org.hibernate.testing.orm.junit.SessionFactoryScope;
7+
import org.junit.jupiter.api.Test;
8+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
99

1010

1111
@TestForIssue(jiraKey = "HHH-17019")
12-
public class GenericCompositeUserTypeTest extends BaseCoreFunctionalTestCase {
13-
14-
@Override
15-
protected Class<?>[] getAnnotatedClasses() {
16-
return new Class<?>[] {
17-
GenericCompositeUserTypeEntity.class
18-
};
19-
}
20-
21-
@Test
22-
public void hhh17019Test() throws Exception {
23-
Session s = openSession();
24-
Transaction tx = s.beginTransaction();
25-
26-
EnumPlaceholder<Weekdays, Weekdays> placeholder = new EnumPlaceholder<>( Weekdays.MONDAY, Weekdays.SUNDAY );
27-
GenericCompositeUserTypeEntity entity = new GenericCompositeUserTypeEntity( placeholder );
28-
29-
s.persist( entity );
30-
31-
tx.commit();
32-
s.close();
33-
}
12+
@DomainModel(
13+
annotatedClasses = {
14+
GenericCompositeUserTypeEntity.class
15+
}
16+
)
17+
@SessionFactory
18+
public class GenericCompositeUserTypeTest {
19+
20+
@Test
21+
@DisabledIfSystemProperty(named = "java.vm.name", matches = "\\b.*OpenJ9.*\\b", disabledReason = "https://github.com/eclipse-openj9/openj9/issues/19369")
22+
public void hhh17019Test(SessionFactoryScope scope) {
23+
scope.inTransaction( session -> {
24+
EnumPlaceholder<Weekdays, Weekdays> placeholder = new EnumPlaceholder<>( Weekdays.MONDAY, Weekdays.SUNDAY );
25+
GenericCompositeUserTypeEntity entity = new GenericCompositeUserTypeEntity( placeholder );
26+
27+
session.persist( entity );
28+
} );
29+
}
3430
}

0 commit comments

Comments
 (0)