From 54a3b517369a23974e18202ff458534f1529e6b1 Mon Sep 17 00:00:00 2001 From: Davide D'Alto Date: Wed, 30 Apr 2025 12:31:10 +0200 Subject: [PATCH] Re-enable all Db2 test that were causing IllegalStateException --- .../reactive/FilterWithPaginationTest.java | 12 ++++------- .../HQLQueryParameterNamedLimitTest.java | 11 +++------- .../HQLQueryParameterPositionalLimitTest.java | 13 +++--------- .../IdentifierGenerationTypeTest.java | 14 ++++--------- .../LazyReplaceOrphanedEntityTest.java | 16 ++++++--------- .../reactive/MutinyExceptionsTest.java | 1 - .../reactive/ORMReactivePersistenceTest.java | 12 ++++------- .../reactive/OrderQueriesTestBase.java | 13 ++++-------- .../hibernate/reactive/OrphanRemovalTest.java | 18 ++++++----------- .../reactive/RowIdUpdateAndDeleteTest.java | 9 +++------ .../reactive/SecondaryTableTest.java | 15 ++++---------- .../reactive/timezones/AutoZonedTest.java | 14 +++++-------- .../reactive/timezones/DefaultZonedTest.java | 18 +++++++---------- .../timezones/JDBCTimeZoneZonedTest.java | 20 ++++++++----------- .../reactive/timezones/PassThruZonedTest.java | 20 ++++++++----------- .../timezones/UTCNormalizedInstantTest.java | 12 ++++------- .../timezones/UTCNormalizedZonedTest.java | 16 ++++++--------- 17 files changed, 79 insertions(+), 155 deletions(-) diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/FilterWithPaginationTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/FilterWithPaginationTest.java index 310a33578..60beb3fa6 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/FilterWithPaginationTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/FilterWithPaginationTest.java @@ -5,17 +5,11 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.concurrent.CompletionStage; - import org.hibernate.annotations.Filter; import org.hibernate.annotations.FilterDef; import org.hibernate.annotations.ParamDef; import org.hibernate.reactive.mutiny.Mutiny; import org.hibernate.reactive.stage.Stage; -import org.hibernate.reactive.annotations.DisabledFor; import org.hibernate.type.descriptor.java.StringJavaType; import org.junit.jupiter.api.BeforeEach; @@ -29,18 +23,20 @@ import jakarta.persistence.Enumerated; import jakarta.persistence.Id; import jakarta.persistence.NamedQuery; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.CompletionStage; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; import static org.hibernate.query.Page.first; import static org.hibernate.query.Page.page; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; /** * 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 { FamousPerson margaret = new FamousPerson( 1L, "Margaret Howe Lovatt", Status.LIVING, "the woman who lived in a half-flooded home with a dolphin." ); diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterNamedLimitTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterNamedLimitTest.java index 526681840..e17664ca8 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterNamedLimitTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterNamedLimitTest.java @@ -5,12 +5,6 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.List; -import java.util.Objects; - -import org.hibernate.reactive.annotations.DisabledFor; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -19,10 +13,12 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; +import java.util.Collection; +import java.util.List; +import java.util.Objects; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.junit.jupiter.api.Assertions.assertEquals; /** @@ -30,7 +26,6 @@ * as defined by the JPA specification, along with limit parameters */ @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "java.lang.IllegalStateException: Needed to have 6 in buffer but only had 0") public class HQLQueryParameterNamedLimitTest extends BaseReactiveTest { Flour spelt = new Flour( 1, "Spelt", "An ancient grain, is a hexaploid species of wheat.", "Wheat flour" ); diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterPositionalLimitTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterPositionalLimitTest.java index 3a60a44c0..61148e873 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterPositionalLimitTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/HQLQueryParameterPositionalLimitTest.java @@ -5,12 +5,6 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.List; -import java.util.Objects; - -import org.hibernate.reactive.annotations.DisabledFor; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -19,10 +13,12 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; +import java.util.Collection; +import java.util.List; +import java.util.Objects; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.junit.jupiter.api.Assertions.assertEquals; /** @@ -76,7 +72,6 @@ public void testFirstResultNoResults(VertxTestContext context) { } @Test - @DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public void testFirstResultSingleResult(VertxTestContext context) { test( context, openSession() .thenCompose( s -> s @@ -90,7 +85,6 @@ public void testFirstResultSingleResult(VertxTestContext context) { } @Test - @DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public void testFirstResultMultipleResults(VertxTestContext context) { test( context, openSession() .thenCompose( s -> s @@ -103,7 +97,6 @@ public void testFirstResultMultipleResults(VertxTestContext context) { } @Test - @DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public void testFirstResultMaxResultsSingleResult(VertxTestContext context) { test( context, openSession() .thenCompose( s -> s diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/IdentifierGenerationTypeTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/IdentifierGenerationTypeTest.java index 38d3904ff..5fe0c7e64 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/IdentifierGenerationTypeTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/IdentifierGenerationTypeTest.java @@ -5,13 +5,6 @@ */ package org.hibernate.reactive; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Objects; - -import org.hibernate.reactive.annotations.DisabledFor; - import org.junit.jupiter.api.Test; import io.vertx.junit5.Timeout; @@ -20,10 +13,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Objects; import org.assertj.core.api.Assertions; import static java.util.concurrent.TimeUnit.MINUTES; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -34,8 +30,6 @@ * @see org.hibernate.reactive.id.impl.IdentifierGeneration */ @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0. " + - "See https://github.com/eclipse-vertx/vertx-sql-client/issues/899") public class IdentifierGenerationTypeTest extends BaseReactiveTest { @Override diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/LazyReplaceOrphanedEntityTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/LazyReplaceOrphanedEntityTest.java index 6793c2563..2e06db219 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/LazyReplaceOrphanedEntityTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/LazyReplaceOrphanedEntityTest.java @@ -5,14 +5,6 @@ */ package org.hibernate.reactive; -import java.io.Serializable; -import java.time.OffsetDateTime; -import java.util.Collection; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.CompletionStage; - -import org.hibernate.reactive.annotations.DisabledFor; import org.hibernate.reactive.util.impl.CompletionStages; import org.junit.jupiter.api.BeforeEach; @@ -33,13 +25,17 @@ import jakarta.persistence.InheritanceType; import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; +import java.io.Serializable; +import java.time.OffsetDateTime; +import java.util.Collection; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.CompletionStage; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public class LazyReplaceOrphanedEntityTest extends BaseReactiveTest { private Campaign theCampaign; diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/MutinyExceptionsTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/MutinyExceptionsTest.java index ab476a81a..694a54ae6 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/MutinyExceptionsTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/MutinyExceptionsTest.java @@ -29,7 +29,6 @@ import static org.hibernate.reactive.testing.ReactiveAssertions.assertThrown; @Timeout(value = 10, timeUnit = MINUTES) - public class MutinyExceptionsTest extends BaseReactiveTest { @Override diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/ORMReactivePersistenceTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/ORMReactivePersistenceTest.java index 00c9b9ee7..f670d421b 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/ORMReactivePersistenceTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/ORMReactivePersistenceTest.java @@ -5,10 +5,6 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.List; -import java.util.Objects; - import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.boot.registry.StandardServiceRegistry; @@ -25,22 +21,22 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; +import java.util.Collection; +import java.util.List; +import java.util.Objects; import static java.util.concurrent.TimeUnit.MINUTES; import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.COCKROACHDB; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.hibernate.reactive.containers.DatabaseConfiguration.dbType; import static org.hibernate.reactive.provider.Settings.DIALECT; import static org.hibernate.reactive.provider.Settings.DRIVER; import static org.junit.jupiter.api.Assertions.assertEquals; -@Timeout(value = 10, timeUnit = MINUTES) - /** * This test class verifies that data can be persisted and queried on the same database * using both JPA/hibernate and reactive session factories. */ -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") +@Timeout(value = 10, timeUnit = MINUTES) @DisabledFor(value = COCKROACHDB, reason = "We need to change the URL schema we normally use for testing") public class ORMReactivePersistenceTest extends BaseReactiveTest { diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderQueriesTestBase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderQueriesTestBase.java index 62d5e4c5c..870140f34 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderQueriesTestBase.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderQueriesTestBase.java @@ -5,16 +5,10 @@ */ package org.hibernate.reactive; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Objects; - import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.Configuration; import org.hibernate.reactive.provider.Settings; import org.hibernate.reactive.testing.SqlStatementTracker; -import org.hibernate.reactive.annotations.DisabledFor; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -25,10 +19,13 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Objects; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; /** * Test {@code hibernate.order_updates} and {@code hibernate.order_inserts} configurations. @@ -36,8 +33,6 @@ * @see Settings#ORDER_INSERTS * @see Settings#ORDER_UPDATES */ - -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public abstract class OrderQueriesTestBase extends BaseReactiveTest { public static class OrderUpdatesTest extends OrderQueriesTestBase { diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrphanRemovalTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrphanRemovalTest.java index 0dfd92f83..79c4617f7 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrphanRemovalTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrphanRemovalTest.java @@ -5,16 +5,6 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.CompletionStage; - - -import org.hibernate.reactive.annotations.DisabledFor; - import org.junit.jupiter.api.Test; import io.vertx.junit5.Timeout; @@ -25,16 +15,20 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.CompletionStage; import static jakarta.persistence.CascadeType.ALL; import static jakarta.persistence.CascadeType.PERSIST; import static jakarta.persistence.CascadeType.REMOVE; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; @Timeout( value = 10, timeUnit = MINUTES) -@DisabledFor( value = DB2, reason = "IllegalStateException: Needed to have 6 in buffer but only had 0" ) public class OrphanRemovalTest extends BaseReactiveTest { @Override diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/RowIdUpdateAndDeleteTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/RowIdUpdateAndDeleteTest.java index 5d97537e5..83bb662cb 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/RowIdUpdateAndDeleteTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/RowIdUpdateAndDeleteTest.java @@ -5,14 +5,11 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.List; - import org.hibernate.annotations.RowId; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.Configuration; -import org.hibernate.reactive.testing.SqlStatementTracker; import org.hibernate.reactive.annotations.DisabledFor; +import org.hibernate.reactive.testing.SqlStatementTracker; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -25,15 +22,15 @@ import jakarta.persistence.MapsId; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; +import java.util.Collection; +import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.ORACLE; /** * Adapted from the test with the same name in Hibernate ORM: {@literal org.hibernate.orm.test.rowid.RowIdUpdateAndDeleteTest} */ -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") @DisabledFor(value = ORACLE, reason = "Vert.x driver doesn't support RowId type parameters") public class RowIdUpdateAndDeleteTest extends BaseReactiveTest { diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/SecondaryTableTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/SecondaryTableTest.java index ad9d71326..5910bf741 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/SecondaryTableTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/SecondaryTableTest.java @@ -5,14 +5,6 @@ */ package org.hibernate.reactive; -import java.util.Collection; -import java.util.Date; -import java.util.List; -import java.util.Objects; - - -import org.hibernate.reactive.annotations.DisabledFor; - import org.junit.jupiter.api.Test; import io.vertx.junit5.Timeout; @@ -26,17 +18,18 @@ import jakarta.persistence.Table; import jakarta.persistence.Temporal; import jakarta.persistence.TemporalType; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Objects; import static java.util.concurrent.TimeUnit.MINUTES; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; 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 SecondaryTableTest extends BaseReactiveTest { @Override 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 eb502bdb1..3cf41d4ac 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 @@ -5,16 +5,16 @@ */ package org.hibernate.reactive.timezones; +import org.hibernate.cfg.Configuration; +import org.hibernate.reactive.BaseReactiveTest; + +import org.junit.jupiter.api.Test; + 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.annotations.DisabledFor; - import java.time.OffsetDateTime; import java.time.ZoneId; import java.time.ZoneOffset; @@ -23,12 +23,9 @@ import java.util.Collection; import java.util.List; -import org.junit.jupiter.api.Test; - 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.type.descriptor.DateTimeUtils.adjustToDefaultPrecision; @@ -36,7 +33,6 @@ * Test adapted from {@link org.hibernate.orm.test.timezones.AutoZonedTest} */ @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public class AutoZonedTest extends BaseReactiveTest { @Override 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 4ce4dbea8..2b4694db7 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,17 +5,8 @@ */ package org.hibernate.reactive.timezones; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZoneOffset; -import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; -import java.util.Collection; -import java.util.List; - import org.hibernate.dialect.TimeZoneSupport; import org.hibernate.reactive.BaseReactiveTest; -import org.hibernate.reactive.annotations.DisabledFor; import org.junit.jupiter.api.Test; @@ -24,10 +15,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.util.Collection; +import java.util.List; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat; import static org.hibernate.type.descriptor.DateTimeUtils.adjustToDefaultPrecision; @@ -35,7 +32,6 @@ * Test adapted from {@link org.hibernate.orm.test.timezones.DefaultZonedTest} */ @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public class DefaultZonedTest extends BaseReactiveTest { @Override 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 71966bfc1..10545d331 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 @@ -5,18 +5,8 @@ */ package org.hibernate.reactive.timezones; -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZoneOffset; -import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; -import java.util.Collection; -import java.util.List; - import org.hibernate.cfg.Configuration; import org.hibernate.reactive.BaseReactiveTest; -import org.hibernate.reactive.annotations.DisabledFor; import org.junit.jupiter.api.Test; @@ -25,12 +15,19 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.util.Collection; +import java.util.List; import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; import static org.hibernate.cfg.AvailableSettings.JDBC_TIME_ZONE; 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.type.descriptor.DateTimeUtils.adjustToDefaultPrecision; @@ -38,7 +35,6 @@ * Test adapted from {@link org.hibernate.orm.test.timezones.JDBCTimeZoneZonedTest} */ @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public class JDBCTimeZoneZonedTest extends BaseReactiveTest { @Override 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 3ce9f4256..4aa255941 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 @@ -5,18 +5,8 @@ */ package org.hibernate.reactive.timezones; -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZoneOffset; -import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; -import java.util.Collection; -import java.util.List; - import org.hibernate.cfg.Configuration; import org.hibernate.reactive.BaseReactiveTest; -import org.hibernate.reactive.annotations.DisabledFor; import org.junit.jupiter.api.Test; @@ -25,19 +15,25 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.util.Collection; +import java.util.List; 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.testing.ReactiveAssertions.assertWithTruncationThat; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.hibernate.type.descriptor.DateTimeUtils.adjustToDefaultPrecision; /** * Test adapted from {@link org.hibernate.orm.test.timezones.PassThruZonedTest} */ @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: SQLException: An error occurred with a DB2 operation, SQLCODE=-180 SQLSTATE=22007") public class PassThruZonedTest extends BaseReactiveTest { @Override 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 278b117e1..7939b8d25 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 @@ -5,14 +5,8 @@ */ package org.hibernate.reactive.timezones; -import java.time.Instant; -import java.util.Collection; -import java.util.List; -import java.util.TimeZone; - import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.reactive.BaseReactiveTest; -import org.hibernate.reactive.annotations.DisabledFor; import org.junit.jupiter.api.Test; @@ -21,14 +15,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import java.time.Instant; +import java.util.Collection; +import java.util.List; +import java.util.TimeZone; import static java.sql.Types.TIMESTAMP; import static java.util.concurrent.TimeUnit.MINUTES; -import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat; @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public class UTCNormalizedInstantTest extends BaseReactiveTest { @Override 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 474f5df7b..111968b13 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 @@ -5,16 +5,8 @@ */ package org.hibernate.reactive.timezones; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZoneOffset; -import java.time.ZonedDateTime; -import java.util.Collection; -import java.util.List; - import org.hibernate.cfg.Configuration; import org.hibernate.reactive.BaseReactiveTest; -import org.hibernate.reactive.annotations.DisabledFor; import org.junit.jupiter.api.Test; @@ -23,16 +15,20 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.util.Collection; +import java.util.List; 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.type.descriptor.DateTimeUtils.adjustToDefaultPrecision; @Timeout(value = 10, timeUnit = MINUTES) -@DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") public class UTCNormalizedZonedTest extends BaseReactiveTest { @Override