From c73f4e26a1d4eb4eb4bdf008051b88510e97cda3 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Tue, 25 Apr 2023 09:32:41 +0200 Subject: [PATCH] Ignore some random UUID tests on Sybase to reduce trailing zero bytes related failures --- .../java/org/hibernate/orm/test/loaders/HqlSelectTest.java | 4 ++++ .../test/mapping/generated/temporals/GeneratedUuidTests.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/loaders/HqlSelectTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/loaders/HqlSelectTest.java index 74bcf91e92..1d0fd6858b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/loaders/HqlSelectTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/loaders/HqlSelectTest.java @@ -9,9 +9,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import org.hibernate.annotations.HQLSelect; +import org.hibernate.dialect.SybaseASEDialect; + import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; +import org.hibernate.testing.orm.junit.SkipForDialect; import org.junit.jupiter.api.Test; import java.util.ArrayList; @@ -23,6 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; @SessionFactory @DomainModel(annotatedClasses = {HqlSelectTest.WithHqlSelect.class, HqlSelectTest.UUID.class}) +@SkipForDialect(dialectClass = SybaseASEDialect.class, reason = "Driver or DB omit trailing zero bytes of a varbinary, making this test fail intermittently") public class HqlSelectTest { @Test diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/temporals/GeneratedUuidTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/temporals/GeneratedUuidTests.java index 18d445d803..ffa8070e14 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/temporals/GeneratedUuidTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/temporals/GeneratedUuidTests.java @@ -19,6 +19,7 @@ import jakarta.persistence.Id; import jakarta.persistence.Table; import org.hibernate.annotations.ValueGenerationType; +import org.hibernate.dialect.SybaseASEDialect; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.generator.EventType; import org.hibernate.tuple.GenerationTiming; @@ -27,6 +28,7 @@ import org.hibernate.generator.BeforeExecutionGenerator; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; +import org.hibernate.testing.orm.junit.SkipForDialect; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -38,6 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @DomainModel( annotatedClasses = GeneratedUuidTests.GeneratedUuidEntity.class ) @SessionFactory +@SkipForDialect(dialectClass = SybaseASEDialect.class, reason = "Driver or DB omit trailing zero bytes of a varbinary, making this test fail intermittently") public class GeneratedUuidTests { @Test public void test(SessionFactoryScope scope) {