Skip to content

Commit 0e02369

Browse files
cigalybeikov
authored andcommitted
HHH-18988 Skip test if dialect does not supports schema creation
1 parent e0f132d commit 0e02369

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/columndiscriminator/ColumnDiscrimnatorWithSchemaTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
import org.hibernate.cfg.AvailableSettings;
88
import org.hibernate.cfg.SchemaToolingSettings;
9+
import org.hibernate.testing.orm.junit.DialectFeatureChecks.SupportSchemaCreation;
910
import org.hibernate.testing.orm.junit.DomainModel;
11+
import org.hibernate.testing.orm.junit.RequiresDialectFeature;
1012
import org.hibernate.testing.orm.junit.ServiceRegistry;
1113
import org.hibernate.testing.orm.junit.SessionFactory;
1214
import org.hibernate.testing.orm.junit.SessionFactoryScope;
@@ -19,8 +21,16 @@
1921
@Setting(name = SchemaToolingSettings.JAKARTA_HBM2DDL_CREATE_SCHEMAS, value = "true")
2022
})
2123
@SessionFactory
24+
@RequiresDialectFeature(feature = SupportSchemaCreation.class)
2225
class ColumnDiscrimnatorWithSchemaTest {
2326

27+
private ColumnDiscrimnatorWithSchemaTest() {
28+
}
29+
30+
static ColumnDiscrimnatorWithSchemaTest createColumnDiscrimnatorWithSchemaTest() {
31+
return new ColumnDiscrimnatorWithSchemaTest();
32+
}
33+
2434
@Test
2535
void testIt(SessionFactoryScope scope) {
2636
scope.inTransaction( entityManager -> {

0 commit comments

Comments
 (0)