Skip to content

Commit ed3fe54

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

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
@@ -8,7 +8,9 @@
88

99
import org.hibernate.cfg.AvailableSettings;
1010
import org.hibernate.cfg.SchemaToolingSettings;
11+
import org.hibernate.testing.orm.junit.DialectFeatureChecks.SupportSchemaCreation;
1112
import org.hibernate.testing.orm.junit.DomainModel;
13+
import org.hibernate.testing.orm.junit.RequiresDialectFeature;
1214
import org.hibernate.testing.orm.junit.ServiceRegistry;
1315
import org.hibernate.testing.orm.junit.SessionFactory;
1416
import org.hibernate.testing.orm.junit.SessionFactoryScope;
@@ -21,8 +23,16 @@
2123
@Setting(name = SchemaToolingSettings.JAKARTA_HBM2DDL_CREATE_SCHEMAS, value = "true")
2224
})
2325
@SessionFactory
26+
@RequiresDialectFeature(feature = SupportSchemaCreation.class)
2427
class ColumnDiscrimnatorWithSchemaTest {
2528

29+
private ColumnDiscrimnatorWithSchemaTest() {
30+
}
31+
32+
static ColumnDiscrimnatorWithSchemaTest createColumnDiscrimnatorWithSchemaTest() {
33+
return new ColumnDiscrimnatorWithSchemaTest();
34+
}
35+
2636
@Test
2737
void testIt(SessionFactoryScope scope) {
2838
scope.inTransaction( entityManager -> {

0 commit comments

Comments
 (0)