enableFor = findAnnotation( context.getElement(), EnableFor.class );
+ if( enableFor != null && enableFor.isPresent() ) {
+ DatabaseConfiguration.DBType type = enableFor.get().value();
+ return type == DatabaseConfiguration.dbType() ?
+ ConditionEvaluationResult.enabled( "" ) :
+ ConditionEvaluationResult.disabled( "" );
+ }
+ return ConditionEvaluationResult.enabled( "" );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/EnableForGroup.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/EnableForGroup.java
new file mode 100644
index 000000000..7ada51fa7
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/EnableForGroup.java
@@ -0,0 +1,59 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.hibernate.reactive.containers.DatabaseConfiguration;
+
+import org.junit.jupiter.api.extension.ExtendWith;
+
+/**
+ * Annotation that allows enabling tests or test methods only for specific database types.
+ *
+ * Types are defined in {@link DatabaseConfiguration.DBType} and can be
+ * applied to a test class or a test method
+ *
+ * {@code
+ *
+ * @EnableForGroup( {
+ * @EnableFor( MYSQL ),
+ * @EnableFor( DB2 )
+ * } )
+ * public class EnableDBsForClassTest {
+ *
+ * @Test
+ * public void test(VertxTestContext context) {
+ * ....
+ * }
+ * }
+ *
+ * public class EnableDBsForMethodTest {
+ *
+ * @Test
+ * @EnableForGroup( {
+ * @EnableFor( POSTGRES),
+ * @EnableFor( MYSQL )
+ * } )
+ * public void test(VertxTestContext context) {
+ * ....
+ * }
+ * }
+ * }
+ *
+ */
+
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE, ElementType.METHOD})
+@ExtendWith( EnableForDBTypeCondition.class )
+public @interface EnableForGroup {
+ EnableFor[] value();
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForClassTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForClassTest.java
new file mode 100644
index 000000000..7773e8d93
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForClassTest.java
@@ -0,0 +1,25 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+
+import org.hibernate.reactive.annotations.DisableFor;
+import org.hibernate.reactive.containers.DatabaseConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+
+@DisableFor(value = POSTGRESQL, reason = "some reason")
+public class DisableForClassTest {
+
+ @Test
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL database
+ assertNotEquals( POSTGRESQL, DatabaseConfiguration.dbType() );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMethodTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMethodTest.java
new file mode 100644
index 000000000..7250411fa
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMethodTest.java
@@ -0,0 +1,24 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.DisableFor;
+import org.hibernate.reactive.containers.DatabaseConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+
+public class DisableForMethodTest {
+
+ @Test
+ @DisableFor(value = POSTGRESQL, reason = "some reason")
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL database
+ assertNotEquals( POSTGRESQL, DatabaseConfiguration.dbType() );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMultipleClassTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMultipleClassTest.java
new file mode 100644
index 000000000..e58c1e4e4
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMultipleClassTest.java
@@ -0,0 +1,26 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.DisableFor;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
+
+@DisableFor(value = MYSQL, reason = "some reason")
+@DisableFor(value = POSTGRESQL, reason = "some reason")
+public class DisableForMultipleClassTest {
+
+ @Test
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL or MYSQL database
+ assertThat( dbType() ).isNotIn( MYSQL, POSTGRESQL );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMultipleMethodTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMultipleMethodTest.java
new file mode 100644
index 000000000..72c415f74
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/DisableForMultipleMethodTest.java
@@ -0,0 +1,28 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+
+import org.hibernate.reactive.annotations.DisableFor;
+import org.hibernate.reactive.containers.DatabaseConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class DisableForMultipleMethodTest {
+
+ @Test
+ @DisableFor(value = MYSQL, reason = "some reason")
+ @DisableFor(value = POSTGRESQL, reason = "some reason")
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL or MYSQL database
+ assertTrue( DatabaseConfiguration.dbType() != POSTGRESQL &&
+ DatabaseConfiguration.dbType() != MYSQL );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForClassTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForClassTest.java
new file mode 100644
index 000000000..ff8e87a4d
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForClassTest.java
@@ -0,0 +1,24 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.EnableFor;
+import org.hibernate.reactive.containers.DatabaseConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@EnableFor(value = POSTGRESQL)
+public class EnableForClassTest {
+
+ @Test
+ public void test() {
+ // Throw exception if this test is database is NOT POSTGRESQL
+ assertEquals( POSTGRESQL, DatabaseConfiguration.dbType() );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForGroupClassTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForGroupClassTest.java
new file mode 100644
index 000000000..30a9a2290
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForGroupClassTest.java
@@ -0,0 +1,29 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.EnableFor;
+import org.hibernate.reactive.annotations.EnableForGroup;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
+
+@EnableForGroup({
+ @EnableFor(value = MYSQL),
+ @EnableFor(value = POSTGRESQL)
+})
+public class EnableForGroupClassTest {
+
+ @Test
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL or MYSQL database
+ assertThat( dbType() ).isIn( MYSQL, POSTGRESQL );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMethodTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMethodTest.java
new file mode 100644
index 000000000..52c11e966
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMethodTest.java
@@ -0,0 +1,24 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.EnableFor;
+import org.hibernate.reactive.containers.DatabaseConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class EnableForMethodTest {
+
+ @Test
+ @EnableFor(value = POSTGRESQL)
+ public void test() {
+ // Throw exception if this test is database is NOT POSTGRESQL
+ assertEquals( POSTGRESQL, DatabaseConfiguration.dbType() );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMultipleClassTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMultipleClassTest.java
new file mode 100644
index 000000000..c78308b25
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMultipleClassTest.java
@@ -0,0 +1,26 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.EnableFor;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
+
+@EnableFor(value = MYSQL)
+@EnableFor(value = POSTGRESQL)
+public class EnableForMultipleClassTest {
+
+ @Test
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL or MYSQL database
+ assertThat( dbType() ).isIn( MYSQL, POSTGRESQL );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMultipleMethodTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMultipleMethodTest.java
new file mode 100644
index 000000000..9c5a2670d
--- /dev/null
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/tests/EnableForMultipleMethodTest.java
@@ -0,0 +1,26 @@
+/* Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright: Red Hat Inc. and Hibernate Authors
+ */
+package org.hibernate.reactive.annotations.tests;
+
+import org.hibernate.reactive.annotations.EnableFor;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
+
+public class EnableForMultipleMethodTest {
+
+ @Test
+ @EnableFor(value = MYSQL)
+ @EnableFor(value = POSTGRESQL)
+ public void test() {
+ // Throw exception if this test is run with POSTGRESQL or MYSQL database
+ assertThat( dbType() ).isIn( MYSQL, POSTGRESQL );
+ }
+}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/configuration/ReactiveConnectionPoolTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/configuration/ReactiveConnectionPoolTest.java
index 06f904671..71c368979 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/configuration/ReactiveConnectionPoolTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/configuration/ReactiveConnectionPoolTest.java
@@ -18,15 +18,14 @@
import org.hibernate.reactive.pool.impl.DefaultSqlClientPool;
import org.hibernate.reactive.pool.impl.DefaultSqlClientPoolConfiguration;
import org.hibernate.reactive.pool.impl.SqlClientPoolConfiguration;
-import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.testing.TestingRegistryExtension;
+import org.hibernate.reactive.annotations.EnableFor;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
-import io.vertx.junit5.RunTestOnContext;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxExtension;
import io.vertx.junit5.VertxTestContext;
@@ -39,24 +38,18 @@
import static org.hibernate.reactive.BaseReactiveTest.test;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.hibernate.reactive.containers.DatabaseConfiguration.getJdbcUrl;
-import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;
import static org.hibernate.reactive.testing.ReactiveAssertions.assertThrown;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ExtendWith(VertxExtension.class)
@TestInstance(TestInstance.Lifecycle.PER_METHOD)
@Timeout(value = 10, timeUnit = TimeUnit.MINUTES)
+@EnableFor(value = POSTGRESQL, reason = "Create new scratch file from selection")
public class ReactiveConnectionPoolTest {
- @RegisterExtension
- public DBSelectionExtension dbSelection = runOnlyFor( POSTGRESQL );
-
@RegisterExtension
public TestingRegistryExtension registryExtension = new TestingRegistryExtension();
- @RegisterExtension
- public RunTestOnContext testOnContext = new RunTestOnContext();
-
private ReactiveConnectionPool configureAndStartPool(Map config) {
DefaultSqlClientPoolConfiguration poolConfig = new DefaultSqlClientPoolConfiguration();
poolConfig.configure( config );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateCockroachDBTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateCockroachDBTestBase.java
index 4a9b78217..6f2ac1ca5 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateCockroachDBTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateCockroachDBTestBase.java
@@ -11,12 +11,11 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.EnableFor;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -41,10 +40,10 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
+@EnableFor(COCKROACHDB)
public abstract class SchemaUpdateCockroachDBTestBase extends BaseReactiveTest {
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuEachySchemaUpdateCockroachTestBase extends SchemaUpdateCockroachDBTestBase {
@Override
@@ -56,7 +55,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
}
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class GroupedSchemaUpdateCockroachTestBase extends SchemaUpdateCockroachDBTestBase {
@Override
@@ -74,9 +72,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
return configuration;
}
- @RegisterExtension
- public DBSelectionExtension dbRule = DBSelectionExtension.runOnlyFor( COCKROACHDB );
-
@BeforeEach
@Override
public void before(VertxTestContext context) {
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMariaDBTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMariaDBTestBase.java
index a66b68c42..d225ef2ce 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMariaDBTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMariaDBTestBase.java
@@ -8,6 +8,15 @@
import java.io.Serializable;
import java.util.Objects;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.reactive.BaseReactiveTest;
+import org.hibernate.reactive.provider.Settings;
+import org.hibernate.reactive.annotations.EnableFor;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
import jakarta.persistence.CascadeType;
@@ -23,28 +32,17 @@
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
-
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
import static java.util.concurrent.TimeUnit.MINUTES;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MARIA;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.GROUPED;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.INDIVIDUALLY;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+@EnableFor(MARIA)
public abstract class SchemaUpdateMariaDBTestBase extends BaseReactiveTest {
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuallySchemaUpdateMariaDBTestBase
extends SchemaUpdateMariaDBTestBase {
@@ -74,9 +72,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
return configuration;
}
- @RegisterExtension
- public DBSelectionExtension dbRule = DBSelectionExtension.runOnlyFor( MARIA );
-
@BeforeEach
@Override
public void before(VertxTestContext context) {
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMySqlTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMySqlTestBase.java
index bef5a6a53..700782fae 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMySqlTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMySqlTestBase.java
@@ -11,12 +11,11 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.EnableFor;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -40,6 +39,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
+@EnableFor(MYSQL)
public abstract class SchemaUpdateMySqlTestBase extends BaseReactiveTest {
@Timeout(value = 10, timeUnit = MINUTES)
@@ -71,9 +71,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
return configuration;
}
- @RegisterExtension
- public DBSelectionExtension dbRule = DBSelectionExtension.runOnlyFor( MYSQL );
-
@BeforeEach
@Override
public void before(VertxTestContext context) {
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateOracleTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateOracleTestBase.java
index 147cba94a..c18f43f04 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateOracleTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateOracleTestBase.java
@@ -8,6 +8,15 @@
import java.io.Serializable;
import java.util.Objects;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.reactive.BaseReactiveTest;
+import org.hibernate.reactive.provider.Settings;
+import org.hibernate.reactive.annotations.EnableFor;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
import jakarta.persistence.CascadeType;
@@ -23,31 +32,17 @@
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
-
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.ORACLE;
-import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.GROUPED;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.INDIVIDUALLY;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
+@EnableFor(ORACLE)
public abstract class SchemaUpdateOracleTestBase extends BaseReactiveTest {
- @RegisterExtension
- public DBSelectionExtension dbRule = runOnlyFor( ORACLE );
-
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuallySchemaUpdateOracleTestBase extends SchemaUpdateOracleTestBase {
@Override
@@ -59,7 +54,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
}
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class GroupedSchemaUpdateOracleTestBase extends SchemaUpdateOracleTestBase {
@Override
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdatePostgreSqlTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdatePostgreSqlTestBase.java
index 972aea7de..45c7e69c8 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdatePostgreSqlTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdatePostgreSqlTestBase.java
@@ -8,6 +8,15 @@
import java.io.Serializable;
import java.util.Objects;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.reactive.BaseReactiveTest;
+import org.hibernate.reactive.provider.Settings;
+import org.hibernate.reactive.annotations.EnableFor;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
import jakarta.persistence.CascadeType;
@@ -23,16 +32,6 @@
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
-
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.GROUPED;
@@ -41,10 +40,10 @@
import static org.junit.jupiter.api.Assertions.assertNotNull;
+@EnableFor(POSTGRESQL)
public abstract class SchemaUpdatePostgreSqlTestBase extends BaseReactiveTest {
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuallySchemaUpdatePostgreSqlTestBase extends SchemaUpdatePostgreSqlTestBase {
@Override
@@ -56,7 +55,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
}
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class GroupedSchemaUpdatePostgreSqlTestBase extends SchemaUpdatePostgreSqlTestBase {
@Override
@@ -74,9 +72,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
return configuration;
}
- @RegisterExtension
- public DBSelectionExtension dbRule = DBSelectionExtension.runOnlyFor( POSTGRESQL );
-
@BeforeEach
@Override
public void before(VertxTestContext context) {
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateSqlServerTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateSqlServerTestBase.java
index c93a3a4de..da0b9df1c 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateSqlServerTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateSqlServerTestBase.java
@@ -12,12 +12,11 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.EnableFor;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -41,6 +40,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
+@EnableFor(SQLSERVER)
public abstract class SchemaUpdateSqlServerTestBase extends BaseReactiveTest {
// This is the default chosen by MSSQL
@@ -50,7 +50,6 @@ public abstract class SchemaUpdateSqlServerTestBase extends BaseReactiveTest {
* Test INDIVIDUALLY option without setting the default catalog name
*/
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuallySchemaUpdateSqlServerTest extends SchemaUpdateSqlServerTestBase {
@Override
@@ -65,7 +64,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
* Test INDIVIDUALLY option when we set the catalog name to the default name
*/
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuallySchemaUpdateWithCatalogTest extends SchemaUpdateSqlServerTestBase {
@Override
@@ -80,7 +78,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
* Test GROUPED option without setting the default catalog name
*/
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class GroupedSchemaUpdateSqlServerTest extends SchemaUpdateSqlServerTestBase {
@Override
@@ -95,7 +92,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
* Test GROUPED option when we set the catalog name to default name
*/
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class GroupedSchemaUpdateWithCatalogNameTest extends SchemaUpdateSqlServerTestBase {
@Override
@@ -113,9 +109,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
return configuration;
}
- @RegisterExtension
- public DBSelectionExtension dbRule = DBSelectionExtension.runOnlyFor( SQLSERVER );
-
@BeforeEach
@Override
public void before(VertxTestContext context) {
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateTestBase.java
index 86d30df19..87f0295da 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateTestBase.java
@@ -11,12 +11,11 @@
import org.hibernate.reactive.BaseReactiveTest;
import org.hibernate.reactive.provider.Settings;
import org.hibernate.reactive.stage.Stage;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -25,7 +24,6 @@
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.SQLSERVER;
import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
-import static org.hibernate.reactive.testing.DBSelectionExtension.skipTestsFor;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.GROUPED;
import static org.hibernate.tool.schema.JdbcMetadaAccessStrategy.INDIVIDUALLY;
@@ -33,10 +31,10 @@
* Schema update will run different queries when the table already exists or
* when columns are missing.
*/
+@DisableFor(value = DB2, reason = "No InformationExtractor for Dialect [org.hibernate.dialect.DB2Dialect..]")
public abstract class SchemaUpdateTestBase extends BaseReactiveTest {
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class IndividuallyStrategyTest extends SchemaUpdateTestBase {
@Override
@@ -48,7 +46,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
}
@Timeout(value = 10, timeUnit = MINUTES)
-
public static class GroupedStrategyTest extends SchemaUpdateTestBase {
@Override
@@ -59,9 +56,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
}
}
- @RegisterExtension
- public DBSelectionExtension dbRule = skipTestsFor( DB2 );
-
protected Configuration constructConfiguration(String action) {
Configuration configuration = super.constructConfiguration();
configuration.setProperty( Settings.HBM2DDL_AUTO, action );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaValidationTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaValidationTestBase.java
index 814344cdb..afc6d0b90 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaValidationTestBase.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaValidationTestBase.java
@@ -10,13 +10,12 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
import org.hibernate.reactive.provider.Settings;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.hibernate.tool.schema.spi.SchemaManagementException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -39,6 +38,7 @@
* - TODO: Missing column
* - TODO: Wrong column type
*/
+@DisableFor(value = DB2, reason = "No InformationExtractor for Dialect [org.hibernate.dialect.DB2Dialect..]")
public abstract class SchemaValidationTestBase extends BaseReactiveTest {
public static class IndividuallyStrategyTest extends SchemaValidationTestBase {
@@ -61,9 +61,6 @@ protected Configuration constructConfiguration(String hbm2DdlOption) {
}
}
- @RegisterExtension
- public DBSelectionExtension dbRule = DBSelectionExtension.skipTestsFor( DB2 );
-
protected Configuration constructConfiguration(String action) {
Configuration configuration = super.constructConfiguration();
configuration.setProperty( Settings.HBM2DDL_JDBC_METADATA_EXTRACTOR_STRATEGY, INDIVIDUALLY.toString() );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/testing/DBSelectionExtension.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/testing/DBSelectionExtension.java
deleted file mode 100644
index 9038f01f0..000000000
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/testing/DBSelectionExtension.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Hibernate, Relational Persistence for Idiomatic Java
- *
- * SPDX-License-Identifier: Apache-2.0
- * Copyright: Red Hat Inc. and Hibernate Authors
- */
-package org.hibernate.reactive.testing;
-
-import java.util.Arrays;
-import java.util.stream.Collectors;
-
-import org.hibernate.reactive.containers.DatabaseConfiguration.DBType;
-
-import org.junit.jupiter.api.extension.ConditionEvaluationResult;
-import org.junit.jupiter.api.extension.ExecutionCondition;
-import org.junit.jupiter.api.extension.ExtensionContext;
-
-import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
-import static org.junit.jupiter.api.extension.ConditionEvaluationResult.disabled;
-import static org.junit.jupiter.api.extension.ConditionEvaluationResult.enabled;
-
-/**
- * Define which db is enabled for the tests in a class.
- *
- * Examples of use:
- *
- * {@code
- *
- * @RegisterExtension public DBSelectionExtension dbSelection = DBSelectionExtension.skipTestsFor( DBType.POSTGRESQL );
- * }
- *
- * {@code
- * @RegisterExtension public DBSelectionExtension dbSelection = DBSelectionExtension.runOnlyFor( DBType.POSTGRESQL );
- * }
- *
- * @see DBType
- */
-public class DBSelectionExtension implements ExecutionCondition {
-
- /**
- * The selected db for running the tests
- */
- private final DBType selectedDb = dbType();
-
- /**
- * Skip the tests for these dbs
- */
- private final DBType[] skippable;
- private final String description;
-
- private DBSelectionExtension(DBType[] skippable, String description) {
- this.skippable = skippable;
- this.description = description;
- }
-
- /**
- * Create an extension that will skip the tests for the selected dbs
- *
- * @param dbTypes the dbs we want to skip
- *
- * @return an instance of {@link DBSelectionExtension}
- */
- public static DBSelectionExtension skipTestsFor(DBType... dbTypes) {
- return new DBSelectionExtension( dbTypes, "Skip tests for " + Arrays.toString( dbTypes ) );
- }
-
- /**
- * Create an extension that will run the tests only for the selected dbs
- *
- * @param dbTypes the dbs we want to use for running the tests
- *
- * @return an instance of {@link DBSelectionExtension}
- */
- public static DBSelectionExtension runOnlyFor(DBType... dbTypes) {
- DBType[] skippable = Arrays.stream( DBType.values() )
- .filter( dbType -> !Arrays.asList( dbTypes ).contains( dbType ) )
- .collect( Collectors.toList() )
- .toArray( new DBType[dbTypes.length] );
- return new DBSelectionExtension( skippable, "Run only for " + Arrays.toString( dbTypes ) );
- }
-
- private boolean isSkippable(DBType dbType) {
- for ( DBType db : skippable ) {
- if ( db == dbType ) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
- return isSkippable( selectedDb )
- ? disabled( "Test is not applicable for " + dbType().toString() )
- : enabled( "" );
- }
-}
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/AutoZonedTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/AutoZonedTest.java
index cad133056..fd9ceca97 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/AutoZonedTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/AutoZonedTest.java
@@ -13,7 +13,7 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import java.time.OffsetDateTime;
import java.time.ZoneId;
@@ -23,7 +23,6 @@
import java.util.List;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,13 +32,9 @@
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0")
public class AutoZonedTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/ColumnZonedTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/ColumnZonedTest.java
index 37c37a60b..d752e86b9 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/ColumnZonedTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/ColumnZonedTest.java
@@ -5,16 +5,6 @@
*/
package org.hibernate.reactive.timezones;
-import io.vertx.junit5.Timeout;
-import io.vertx.junit5.VertxTestContext;
-import jakarta.persistence.Entity;
-import jakarta.persistence.GeneratedValue;
-import jakarta.persistence.Id;
-
-import org.hibernate.cfg.Configuration;
-import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
-
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
@@ -22,8 +12,17 @@
import java.util.Collection;
import java.util.List;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.reactive.BaseReactiveTest;
+import org.hibernate.reactive.annotations.DisableFor;
+
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+
+import io.vertx.junit5.Timeout;
+import io.vertx.junit5.VertxTestContext;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
@@ -33,13 +32,9 @@
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "java.sql.SQLException: An error occurred with a DB2 operation, SQLCODE=-180 SQLSTATE=22007")
public class ColumnZonedTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/DefaultZonedTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/DefaultZonedTest.java
index 598693364..948e6098d 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/DefaultZonedTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/DefaultZonedTest.java
@@ -5,16 +5,6 @@
*/
package org.hibernate.reactive.timezones;
-import io.vertx.junit5.Timeout;
-import io.vertx.junit5.VertxTestContext;
-import jakarta.persistence.Entity;
-import jakarta.persistence.GeneratedValue;
-import jakarta.persistence.Id;
-
-import org.hibernate.dialect.TimeZoneSupport;
-import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
-
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
@@ -22,8 +12,17 @@
import java.util.Collection;
import java.util.List;
+import org.hibernate.dialect.TimeZoneSupport;
+import org.hibernate.reactive.BaseReactiveTest;
+import org.hibernate.reactive.annotations.DisableFor;
+
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+
+import io.vertx.junit5.Timeout;
+import io.vertx.junit5.VertxTestContext;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
@@ -32,13 +31,9 @@
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0")
public class DefaultZonedTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/JDBCTimeZoneZonedTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/JDBCTimeZoneZonedTest.java
index 5df4c0326..a4b092d4b 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/JDBCTimeZoneZonedTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/JDBCTimeZoneZonedTest.java
@@ -15,10 +15,9 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -35,13 +34,9 @@
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0")
public class JDBCTimeZoneZonedTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/PassThruZonedTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/PassThruZonedTest.java
index d8463102b..4bcbc4edf 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/PassThruZonedTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/PassThruZonedTest.java
@@ -15,10 +15,9 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -29,18 +28,14 @@
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.cfg.AvailableSettings.TIMEZONE_DEFAULT_STORAGE;
-import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat;
+import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "Exception: SQLException: An error occurred with a DB2 operation, SQLCODE=-180 SQLSTATE=22007")
public class PassThruZonedTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/TimeZoneStorageMappingTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/TimeZoneStorageMappingTest.java
index 5539223df..86d017d60 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/TimeZoneStorageMappingTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/TimeZoneStorageMappingTest.java
@@ -21,11 +21,10 @@
import org.hibernate.annotations.TimeZoneStorageType;
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -58,12 +57,9 @@
*
*/
@Timeout(value = 10, timeUnit = MINUTES)
+@DisableFor(value = SQLSERVER, reason = "currently does not support java.time.OffsetTime")
public class TimeZoneStorageMappingTest extends BaseReactiveTest {
- // SQLSERVER currently does not support java.time.OffsetTime
- @RegisterExtension
- public DBSelectionExtension selectionRule = DBSelectionExtension.skipTestsFor( SQLSERVER );
-
private static final ZoneOffset JVM_TIMEZONE_OFFSET = OffsetDateTime.now().getOffset();
private static final OffsetTime OFFSET_TIME = OffsetTime.of(
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedInstantTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedInstantTest.java
index b9d0822b2..7f1934d19 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedInstantTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedInstantTest.java
@@ -12,10 +12,9 @@
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -29,13 +28,9 @@
import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0")
public class UTCNormalizedInstantTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedZonedTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedZonedTest.java
index fd686b543..590d4ecd1 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedZonedTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedZonedTest.java
@@ -14,10 +14,9 @@
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -33,13 +32,9 @@
import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision;
@Timeout(value = 10, timeUnit = MINUTES)
-
+@DisableFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0")
public class UTCNormalizedZonedTest extends BaseReactiveTest {
- // Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Zoned.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java
index 9d8a34d9f..9644cc3f0 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java
@@ -29,12 +29,10 @@
import org.hibernate.annotations.Type;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.VertxTestContext;
import jakarta.persistence.AttributeConverter;
@@ -64,7 +62,6 @@
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat;
-
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -73,11 +70,8 @@
/**
* Test all the types and lifecycle callbacks that we expect to work on all supported DBs
*/
-public class BasicTypesAndCallbacksForAllDBsTest extends BaseReactiveTest {
- //Db2: testUUIDType throws NoStackTraceThrowable: parameter of type BufferImpl cannot be coerced to ByteBuf
- @RegisterExtension
- public final DBSelectionExtension skip = DBSelectionExtension.skipTestsFor( DB2 );
+public class BasicTypesAndCallbacksForAllDBsTest extends BaseReactiveTest {
@Override
protected Set> annotatedEntities() {
@@ -381,7 +375,6 @@ public void testBigIntegerType(VertxTestContext context) {
}
@Test
- @Disabled // Fail for MSSQL because the value changes before it's saved on the db. This also fails for ORM
public void testLocalTimeType(VertxTestContext context) {
Basic basic = new Basic();
basic.localTime = LocalTime.now();
@@ -418,6 +411,7 @@ public void testDuration(VertxTestContext context) {
}
@Test
+ @DisableFor(value = DB2, reason = "java.sql.SQLException: An error occurred with a DB2 operation, SQLCODE=-180 SQLSTATE=22007 in insert query")
public void testInstant(VertxTestContext context) {
Basic basic = new Basic();
basic.instant = Instant.now();
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java
index 739fb18a0..ed593f8e4 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java
@@ -18,9 +18,9 @@
import java.util.function.Consumer;
import org.hibernate.reactive.BaseReactiveTest;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.DisabledIf;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -34,13 +34,12 @@
import static java.lang.Boolean.TRUE;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.ORACLE;
-import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@Timeout(value = 10, timeUnit = MINUTES)
-@DisabledIf("isNotSupported")
+@DisableFor( value = ORACLE, reason = "Vert.x does not support arrays for Oracle" )
public class JavaTypesArrayTest extends BaseReactiveTest {
@Override
@@ -48,11 +47,6 @@ protected Set> annotatedEntities() {
return Set.of( Basic.class );
}
- public static boolean isNotSupported() {
- // Vert.x does not support arrays for Oracle
- return dbType() == ORACLE;
- }
-
private void testField(
VertxTestContext context, Basic
original, Consumer consumer) {
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JsonTypeTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JsonTypeTest.java
index 7c9a02730..d0b35932b 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JsonTypeTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JsonTypeTest.java
@@ -12,10 +12,9 @@
import java.util.function.Consumer;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.core.json.JsonObject;
import io.vertx.junit5.Timeout;
@@ -40,13 +39,12 @@
*/
@Timeout(value = 10, timeUnit = MINUTES)
+@DisableFor(value = DB2, reason = "java.sql.SQLException: The object 'HREACT.JSONENTITY' provided is not defined, SQLCODE=-204 SQLSTATE=42704")
+@DisableFor(value = SQLSERVER, reason = "java.lang.IllegalArgumentException: Unsupported value class: class io.vertx.core.json.JsonObject")
+@DisableFor(value = ORACLE, reason = "java.sql.SQLException: ORA-17004: Invalid column type: https://docs.oracle.com/error-help/db/ora-17004/")
+@DisableFor(value = MARIA, reason = "ORM 6 regression, see: https://github.com/hibernate/hibernate-reactive/issues/1529")
public class JsonTypeTest extends BaseReactiveTest {
- // MARIA: ORM 6 regression, see: https://github.com/hibernate/hibernate-reactive/issues/1529
- @RegisterExtension
- public DBSelectionExtension selectionRule = DBSelectionExtension
- .skipTestsFor( DB2, SQLSERVER, ORACLE, MARIA );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Basic.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LobTypeTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LobTypeTest.java
index 5644aa9b9..e1482630b 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LobTypeTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LobTypeTest.java
@@ -11,10 +11,9 @@
import java.util.function.Consumer;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -29,7 +28,6 @@
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
-import static org.hibernate.reactive.testing.DBSelectionExtension.skipTestsFor;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -37,13 +35,10 @@
* Test types that we expect to work only on selected DBs.
*/
@Timeout(value = 10, timeUnit = MINUTES)
+@DisableFor(value = DB2, reason = " Client doesn't support CLOB type. See https://github.com/hibernate/hibernate-reactive/issues/1662")
+@DisableFor(value = POSTGRESQL, reason = "Client doesn't support OID type: See https://github.com/hibernate/hibernate-reactive/issues/1663")
public class LobTypeTest extends BaseReactiveTest {
- // Db2: Client doesn't support CLOB type. See https://github.com/hibernate/hibernate-reactive/issues/1662
- // Postgres: Client doesn't support OID type: See https://github.com/hibernate/hibernate-reactive/issues/1663
- @RegisterExtension
- public DBSelectionExtension selectionRule = skipTestsFor( DB2, POSTGRESQL );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Basic.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LongLobTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LongLobTest.java
index 4a4af38f0..80d8c6063 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LongLobTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LongLobTest.java
@@ -11,10 +11,8 @@
import java.util.function.Consumer;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -26,18 +24,12 @@
import jakarta.persistence.Table;
import static java.util.concurrent.TimeUnit.MINUTES;
-import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
-import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@Timeout(value = 10, timeUnit = MINUTES)
-
public class LongLobTest extends BaseReactiveTest {
- @RegisterExtension
- public DBSelectionExtension selectionRule = runOnlyFor( MYSQL );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Basic.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonTypeTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonTypeTest.java
index 4319e37f9..e3786fe30 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonTypeTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonTypeTest.java
@@ -12,10 +12,9 @@
import java.util.function.Consumer;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.core.json.JsonObject;
import io.vertx.junit5.Timeout;
@@ -33,7 +32,6 @@
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MARIA;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.ORACLE;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.SQLSERVER;
-import static org.hibernate.reactive.testing.DBSelectionExtension.skipTestsFor;
import static org.hibernate.reactive.util.impl.CompletionStages.loop;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -43,11 +41,12 @@
*/
@Timeout(value = 10, timeUnit = MINUTES)
+@DisableFor(value = DB2, reason = "SQLException: The object 'HREACT.JSONENTITY' provided is not defined, SQLCODE=-204 SQLSTATE=42704")
+@DisableFor(value = SQLSERVER, reason = "Unsupported value class: class io.vertx.core.json.JsonObject from vertx.mssqlclient")
+@DisableFor(value = MARIA, reason = " org.hibernate.HibernateException: Expecting raw JDBC value of type `io.vertx.core.json.JsonObject`, but found `java.lang.String` : [{\"int\":123,\"str\":\"hello\"}]")
+@DisableFor(value = ORACLE, reason = "java.sql.SQLException: ORA-17004: Invalid column type: see https://docs.oracle.com/error-help/db/ora-17004/")
public class StringToJsonTypeTest extends BaseReactiveTest {
- @RegisterExtension
- public DBSelectionExtension selectionRule = skipTestsFor( DB2, SQLSERVER, MARIA, ORACLE );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Basic.class );
diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/UserJsonTypeTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/UserJsonTypeTest.java
index 8cb7ec99e..e483f847c 100644
--- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/UserJsonTypeTest.java
+++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/UserJsonTypeTest.java
@@ -13,10 +13,9 @@
import org.hibernate.annotations.Type;
import org.hibernate.reactive.BaseReactiveTest;
-import org.hibernate.reactive.testing.DBSelectionExtension;
+import org.hibernate.reactive.annotations.DisableFor;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
import io.vertx.core.json.JsonObject;
import io.vertx.junit5.Timeout;
@@ -32,7 +31,6 @@
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.ORACLE;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.SQLSERVER;
-import static org.hibernate.reactive.testing.DBSelectionExtension.skipTestsFor;
import static org.hibernate.reactive.util.impl.CompletionStages.loop;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -41,11 +39,11 @@
* Test types that we expect to work only on selected DBs.
*/
@Timeout(value = 10, timeUnit = MINUTES)
+@DisableFor(value = DB2, reason = "SQLException: The object 'HREACT.JSONENTITY' provided is not defined, SQLCODE=-204 SQLSTATE=42704")
+@DisableFor(value = SQLSERVER, reason = "Unsupported value class: class io.vertx.core.json.JsonObject")
+@DisableFor(value = ORACLE, reason = "java.sql.SQLException: ORA-17004: Invalid column type: see https://docs.oracle.com/error-help/db/ora-17004/")
public class UserJsonTypeTest extends BaseReactiveTest {
- @RegisterExtension
- public DBSelectionExtension selectionRule = skipTestsFor( DB2, SQLSERVER, ORACLE );
-
@Override
protected Collection> annotatedEntities() {
return List.of( Basic.class );