HHH-18543 Skip GenericCompositeUserTypeTest for JVM OpenJ9

This commit is contained in:
Andrea Boriero 2024-08-29 13:02:09 +02:00 committed by Andrea Boriero
parent 052eb0b78c
commit 7e4df3f805
1 changed files with 21 additions and 25 deletions

View File

@ -1,34 +1,30 @@
package org.hibernate.orm.test.cut.generic;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
@TestForIssue(jiraKey = "HHH-17019")
public class GenericCompositeUserTypeTest extends BaseCoreFunctionalTestCase {
@DomainModel(
annotatedClasses = {
GenericCompositeUserTypeEntity.class
}
)
@SessionFactory
public class GenericCompositeUserTypeTest {
@Override
protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[] {
GenericCompositeUserTypeEntity.class
};
}
@Test
@DisabledIfSystemProperty(named = "java.vm.name", matches = "\\b.*OpenJ9.*\\b", disabledReason = "https://github.com/eclipse-openj9/openj9/issues/19369")
public void hhh17019Test(SessionFactoryScope scope) {
scope.inTransaction( session -> {
EnumPlaceholder<Weekdays, Weekdays> placeholder = new EnumPlaceholder<>( Weekdays.MONDAY, Weekdays.SUNDAY );
GenericCompositeUserTypeEntity entity = new GenericCompositeUserTypeEntity( placeholder );
@Test
public void hhh17019Test() throws Exception {
Session s = openSession();
Transaction tx = s.beginTransaction();
EnumPlaceholder<Weekdays, Weekdays> placeholder = new EnumPlaceholder<>( Weekdays.MONDAY, Weekdays.SUNDAY );
GenericCompositeUserTypeEntity entity = new GenericCompositeUserTypeEntity( placeholder );
s.persist( entity );
tx.commit();
s.close();
}
session.persist( entity );
} );
}
}