Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hibernate/hibernate-reactive
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.2.1
Choose a base ref
...
head repository: hibernate/hibernate-reactive
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.2.2
Choose a head ref
  • 8 commits
  • 68 files changed
  • 2 contributors

Commits on Jan 12, 2024

  1. 2.2.2-SNAPSHOT

    DavideD committed Jan 12, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    DavideD Davide D'Alto
    Copy the full SHA
    e5ff7de View commit details

Commits on Jan 19, 2024

  1. [#1838] Remove unused code

    This code causes a failure with Quarkus at start up:
    quarkusio/quarkus#38263
    
    CI still works when I remove it, and a `DeleteOrUpsertOperation`
    cannot be cast to `OptionalTableUpdate` anyway.
    
    So I don't think this code is useful.
    DavideD committed Jan 19, 2024
    Copy the full SHA
    d0627dd View commit details
  2. [#1840] Upgrade Hibernate ORM to 6.4.2.Final

    DavideD committed Jan 19, 2024
    Copy the full SHA
    2e88335 View commit details

Commits on Jan 23, 2024

  1. Copy the full SHA
    afdddd9 View commit details
  2. Copy the full SHA
    6a147af View commit details
  3. Copy the full SHA
    39b86de View commit details
  4. [#1827] Clean up ReactiveConnectionPoolTest

    DavideD committed Jan 23, 2024
    Copy the full SHA
    4d8c5a6 View commit details

Commits on Jan 24, 2024

  1. 2.2.2.Final

    DavideD committed Jan 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    DavideD Davide D'Alto
    Copy the full SHA
    70a5444 View commit details
Showing with 607 additions and 572 deletions.
  1. +1 −1 README.md
  2. +1 −1 build.gradle
  3. +1 −1 gradle/version.properties
  4. +1 −11 ...va/org/hibernate/reactive/persister/entity/impl/ReactiveMergeCoordinatorStandardScopeFactory.java
  5. +20 −16 ...nate-reactive-core/src/test/java/org/hibernate/reactive/CustomOneToOneStoredProcedureSqlTest.java
  6. +3 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/CustomSqlTest.java
  7. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/CustomStoredProcedureSqlTest.java
  8. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/EmptyCompositeCollectionKeyTest.java
  9. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/FetchedAssociationTest.java
  10. +2 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/FilterWithPaginationTest.java
  11. +0 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/FormulaTest.java
  12. +5 −11 hibernate-reactive-core/src/test/java/org/hibernate/reactive/GeneratedPropertyJoinedTableTest.java
  13. +5 −11 hibernate-reactive-core/src/test/java/org/hibernate/reactive/GeneratedPropertySingleTableTest.java
  14. +5 −11 ...nate-reactive-core/src/test/java/org/hibernate/reactive/GeneratedPropertyUnionSubclassesTest.java
  15. +2 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterNamedLimitTest.java
  16. +4 −8 ...nate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterPositionalLimitTest.java
  17. +3 −9 hibernate-reactive-core/src/test/java/org/hibernate/reactive/IdentifierGenerationTypeTest.java
  18. +2 −7 ...e-reactive-core/src/test/java/org/hibernate/reactive/IdentityGeneratorTypeForCockroachDBTest.java
  19. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/IdentityGeneratorTypeTest.java
  20. +2 −6 ...ore/src/test/java/org/hibernate/reactive/InsertOrderingReferenceSeveralDifferentSubclassBase.java
  21. +5 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/InternalStateAssertionsTest.java
  22. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/LazyReplaceOrphanedEntityTest.java
  23. +2 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/LazyUniqueKeyTest.java
  24. +2 −6 ...te-reactive-core/src/test/java/org/hibernate/reactive/NativeQueryPlaceholderSubstitutionTest.java
  25. +3 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/ORMReactivePersistenceTest.java
  26. +3 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderQueriesTestBase.java
  27. +5 −11 hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderedEmbeddableCollectionTest.java
  28. +3 −6 hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrphanRemovalTest.java
  29. +2 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/ReactiveMultitenantNoResolverTest.java
  30. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/ReactiveMultitenantTest.java
  31. +3 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/RowIdUpdateAndDeleteTest.java
  32. +3 −5 hibernate-reactive-core/src/test/java/org/hibernate/reactive/SQLSelectTest.java
  33. +3 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/SecondaryTableTest.java
  34. +3 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/SequenceGeneratorTest.java
  35. +0 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/UUIDGeneratorTest.java
  36. +32 −0 hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/DisabledFor.java
  37. +49 −0 ...te-reactive-core/src/test/java/org/hibernate/reactive/annotations/DisabledForDBTypeCondition.java
  38. +26 −0 hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/DisabledForDbTypes.java
  39. +32 −0 hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/EnabledFor.java
  40. +49 −0 ...ate-reactive-core/src/test/java/org/hibernate/reactive/annotations/EnabledForDBTypeCondition.java
  41. +26 −0 hibernate-reactive-core/src/test/java/org/hibernate/reactive/annotations/EnabledForDbTypes.java
  42. +102 −0 ...active-core/src/test/java/org/hibernate/reactive/annotations/tests/FilterByDbTypeOnClassTest.java
  43. +82 −0 ...ctive-core/src/test/java/org/hibernate/reactive/annotations/tests/FilterByDbTypeOnMethodTest.java
  44. +4 −6 ...-reactive-core/src/test/java/org/hibernate/reactive/configuration/ReactiveConnectionPoolTest.java
  45. +2 −7 ...te-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateCockroachDBTestBase.java
  46. +12 −17 hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMariaDBTestBase.java
  47. +2 −5 hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateMySqlTestBase.java
  48. +10 −16 hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateOracleTestBase.java
  49. +10 −15 ...ate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdatePostgreSqlTestBase.java
  50. +2 −9 ...nate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateSqlServerTestBase.java
  51. +2 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaUpdateTestBase.java
  52. +2 −5 hibernate-reactive-core/src/test/java/org/hibernate/reactive/schema/SchemaValidationTestBase.java
  53. +0 −96 hibernate-reactive-core/src/test/java/org/hibernate/reactive/testing/DBSelectionExtension.java
  54. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/AutoZonedTest.java
  55. +11 −16 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/ColumnZonedTest.java
  56. +11 −16 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/DefaultZonedTest.java
  57. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/JDBCTimeZoneZonedTest.java
  58. +3 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/PassThruZonedTest.java
  59. +2 −6 ...nate-reactive-core/src/test/java/org/hibernate/reactive/timezones/TimeZoneStorageMappingTest.java
  60. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedInstantTest.java
  61. +2 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/timezones/UTCNormalizedZonedTest.java
  62. +3 −9 ...reactive-core/src/test/java/org/hibernate/reactive/types/BasicTypesAndCallbacksForAllDBsTest.java
  63. +2 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java
  64. +5 −7 hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JsonTypeTest.java
  65. +3 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LobTypeTest.java
  66. +0 −8 hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/LongLobTest.java
  67. +5 −6 hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonTypeTest.java
  68. +4 −6 hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/UserJsonTypeTest.java
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ Hibernate Reactive has been tested with:
- CockroachDB 22.1
- MS SQL Server 2019
- Oracle 21.3
- [Hibernate ORM][] 6.4.1.Final
- [Hibernate ORM][] 6.4.2.Final
- [Vert.x Reactive PostgreSQL Client](https://vertx.io/docs/vertx-pg-client/java/) 4.5.1
- [Vert.x Reactive MySQL Client](https://vertx.io/docs/vertx-mysql-client/java/) 4.5.1
- [Vert.x Reactive Db2 Client](https://vertx.io/docs/vertx-db2-client/java/) 4.5.1
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ version = projectVersion
// ./gradlew clean build -PhibernateOrmVersion=5.6.15-SNAPSHOT
ext {
if ( !project.hasProperty('hibernateOrmVersion') ) {
hibernateOrmVersion = '6.4.1.Final'
hibernateOrmVersion = '6.4.2.Final'
}
if ( !project.hasProperty( 'hibernateOrmGradlePluginVersion' ) ) {
// Same as ORM as default
2 changes: 1 addition & 1 deletion gradle/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
projectVersion=2.2.1.Final
projectVersion=2.2.2.Final
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
package org.hibernate.reactive.persister.entity.impl;


import org.hibernate.dialect.OracleDialect;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.persister.entity.AbstractEntityPersister;
import org.hibernate.persister.entity.mutation.MergeCoordinator;
@@ -22,7 +21,6 @@
import org.hibernate.sql.model.ast.TableMutation;
import org.hibernate.sql.model.internal.MutationOperationGroupFactory;
import org.hibernate.sql.model.internal.OptionalTableUpdate;
import org.hibernate.sql.model.jdbc.DeleteOrUpsertOperation;
import org.hibernate.sql.model.jdbc.OptionalTableUpdateOperation;

public class ReactiveMergeCoordinatorStandardScopeFactory extends MergeCoordinator
@@ -46,6 +44,7 @@ public ReactiveScopedUpdateCoordinator makeScopedCoordinator() {
);
}

// We override the whole method but we just need to plug in our custom createOperation(...) method
@Override
protected MutationOperationGroup createOperationGroup(ValuesAnalysis valuesAnalysis, MutationGroup mutationGroup) {
final int numberOfTableMutations = mutationGroup.getNumberOfTableMutations();
@@ -101,15 +100,6 @@ protected MutationOperation createOperation(ValuesAnalysis valuesAnalysis, Table
factory()
);
}
if ( operation instanceof DeleteOrUpsertOperation
&& factory().getJdbcServices().getDialect() instanceof OracleDialect ) {
OracleDialect dialect = ( (OracleDialect) factory().getJdbcServices().getDialect() );
return dialect.createOptionalTableUpdateOperation(
( (OptionalTableUpdate) operation ).getMutationTarget(),
(OptionalTableUpdate) operation,
factory()
);
}
return operation;
}
}
Original file line number Diff line number Diff line change
@@ -5,37 +5,41 @@
*/
package org.hibernate.reactive;

import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
import jakarta.persistence.*;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLInsert;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.testing.ReactiveAssertions;
import org.hibernate.reactive.annotations.EnabledFor;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;

import static java.util.concurrent.TimeUnit.*;
import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
import jakarta.persistence.Basic;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;

import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.*;
import static org.hibernate.reactive.testing.DBSelectionExtension.*;
import static org.junit.jupiter.api.Assertions.*;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

@Timeout(value = 10, timeUnit = MINUTES)

@EnabledFor(POSTGRESQL)
public class CustomOneToOneStoredProcedureSqlTest extends BaseReactiveTest {

@RegisterExtension
public DBSelectionExtension dbSelection = runOnlyFor( POSTGRESQL );
private IndividualPerson individualPerson;
private DriverLicence driverLicence;
private static final String INITIAL_LICENCE_NO = "12545KLI12";
Original file line number Diff line number Diff line change
@@ -12,10 +12,9 @@
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLInsert;
import org.hibernate.annotations.SQLUpdate;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.annotations.EnabledFor;

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,15 @@
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.COCKROACHDB;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;

@Timeout(value = 10, timeUnit = MINUTES)

@EnabledFor(POSTGRESQL)
@EnabledFor(COCKROACHDB)
public class CustomSqlTest extends BaseReactiveTest {

@RegisterExtension
public DBSelectionExtension dbSelection = runOnlyFor( POSTGRESQL, COCKROACHDB );

@Override
protected Collection<Class<?>> annotatedEntities() {
return List.of( Record.class );
Original file line number Diff line number Diff line change
@@ -13,13 +13,12 @@
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLInsert;
import org.hibernate.annotations.SQLUpdate;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.testing.ReactiveAssertions;
import org.hibernate.reactive.annotations.EnabledFor;

import org.junit.jupiter.api.Assertions;
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;
@@ -33,18 +32,14 @@
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;

@Timeout(value = 10, timeUnit = MINUTES)

@EnabledFor(POSTGRESQL)
public class CustomStoredProcedureSqlTest extends BaseReactiveTest {

@RegisterExtension
public DBSelectionExtension dbSelection = runOnlyFor( POSTGRESQL );

private SimpleRecord theRecord;

private static final String INITIAL_TEXT = "blue suede shoes";
Original file line number Diff line number Diff line change
@@ -13,10 +13,9 @@
import org.hibernate.Hibernate;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.annotations.DisabledFor;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -28,19 +27,15 @@

import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.testing.DBSelectionExtension.skipTestsFor;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@Timeout(value = 10, timeUnit = MINUTES)
@DisabledFor( value = DB2, reason = "IllegalStateException: Needed to have 6 in buffer but only had 0" )
public class EmptyCompositeCollectionKeyTest extends BaseReactiveTest {

// Db2: Throws java.lang.IllegalStateException: Needed to have 6 in buffer but only had 0. In JDBC we would normally block here but need to find a non-blocking solution
@RegisterExtension
public DBSelectionExtension dbSelection = skipTestsFor( DB2 );

@Override
protected Collection<Class<?>> annotatedEntities() {
return List.of( Family.class );
Original file line number Diff line number Diff line change
@@ -11,11 +11,10 @@

import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.testing.SqlStatementTracker;
import org.hibernate.reactive.annotations.EnabledFor;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -32,18 +31,14 @@
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;

/**
* Test that's not necessary to do a fetch when we want to add a new element to an association.
*/
@Timeout(value = 10, timeUnit = MINUTES)

@EnabledFor(value = POSTGRESQL, reason = "We use native queries, they might be different for other DBs")
public class FetchedAssociationTest extends BaseReactiveTest {

@RegisterExtension // We use native queries, they might be different for other DBs
public DBSelectionExtension dbSelection = runOnlyFor( POSTGRESQL );

private SqlStatementTracker sqlTracker;

@Override
Original file line number Diff line number Diff line change
@@ -15,12 +15,11 @@
import org.hibernate.annotations.ParamDef;
import org.hibernate.reactive.mutiny.Mutiny;
import org.hibernate.reactive.stage.Stage;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.annotations.DisabledFor;
import org.hibernate.type.descriptor.java.StringJavaType;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.smallrye.mutiny.Uni;
import io.vertx.junit5.Timeout;
@@ -36,19 +35,14 @@
import static org.hibernate.query.Page.first;
import static org.hibernate.query.Page.page;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2;
import static org.hibernate.reactive.testing.DBSelectionExtension.skipTestsFor;

/**
* Test the combination of filters, max results, first result, and {@link org.hibernate.query.Page}.
*/
@Timeout(value = 10, timeUnit = MINUTES)

@DisabledFor(value = DB2, reason = "IllegalStateException: Needed to have 6 in buffer but only had 0")
public class FilterWithPaginationTest extends BaseReactiveTest {

// Db2: Exception: IllegalStateException: Needed to have 6 in buffer but only had 0
@RegisterExtension
public final DBSelectionExtension skip = skipTestsFor( DB2 );

FamousPerson margaret = new FamousPerson( 1L, "Margaret Howe Lovatt", Status.LIVING, "the woman who lived in a half-flooded home with a dolphin." );
FamousPerson nellie = new FamousPerson( 2L, "Nellie Bly", Status.DECEASED, "In 1888, she traveled around the world in 72 days." );
FamousPerson hedy = new FamousPerson( 3L, "Hedy Lamarr", Status.DECEASED, "Actress and co-inventor of an early version of frequency-hopping spread spectrum communication for torpedo guidance." );
Original file line number Diff line number Diff line change
@@ -10,11 +10,9 @@
import java.util.List;

import org.hibernate.annotations.Formula;
import org.hibernate.reactive.testing.DBSelectionExtension;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -25,16 +23,10 @@
import jakarta.persistence.Table;

import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MARIA;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;

@Timeout(value = 10, timeUnit = MINUTES)

public class FormulaTest extends BaseReactiveTest {

@RegisterExtension
public DBSelectionExtension dbSelection = DBSelectionExtension.skipTestsFor( MARIA, MYSQL );

@Override
protected Collection<Class<?>> annotatedEntities() {
return List.of( Record.class );
Original file line number Diff line number Diff line change
@@ -14,10 +14,9 @@
import org.hibernate.annotations.GenerationTime;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.reactive.testing.DBSelectionExtension;
import org.hibernate.reactive.annotations.DisabledFor;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import io.vertx.junit5.Timeout;
import io.vertx.junit5.VertxTestContext;
@@ -32,10 +31,9 @@
import jakarta.persistence.TemporalType;

import static java.util.concurrent.TimeUnit.MINUTES;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.COCKROACHDB;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.MYSQL;
import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.POSTGRESQL;
import static org.hibernate.reactive.testing.DBSelectionExtension.runOnlyFor;
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.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
@@ -44,13 +42,9 @@
* Test the @{@link Generated} annotation with {@link InheritanceType#JOINED}
*/
@Timeout(value = 10, timeUnit = MINUTES)

@DisabledFor(value = {SQLSERVER, ORACLE, DB2}, reason = "test uses SQL queries")
public class GeneratedPropertyJoinedTableTest extends BaseReactiveTest {

// It requires native queries, so it won't work for every db
@RegisterExtension
public DBSelectionExtension selectionRule = runOnlyFor( POSTGRESQL, COCKROACHDB, MYSQL );

@Override
protected Collection<Class<?>> annotatedEntities() {
return List.of( GeneratedWithIdentity.class, GeneratedRegular.class );
Loading