From 74218d84c4bea1cceb5c925c8a6094d8136c2222 Mon Sep 17 00:00:00 2001 From: Nathan Xu Date: Mon, 5 Oct 2020 16:13:21 -0400 Subject: [PATCH] HHH-14227 fix testing failure on Oracle --- .../internal/ScrollableResultsObjectArrayCastingTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/test/java/org/hibernate/internal/ScrollableResultsObjectArrayCastingTest.java b/hibernate-core/src/test/java/org/hibernate/internal/ScrollableResultsObjectArrayCastingTest.java index aa985c344a..46378b86ed 100644 --- a/hibernate-core/src/test/java/org/hibernate/internal/ScrollableResultsObjectArrayCastingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/internal/ScrollableResultsObjectArrayCastingTest.java @@ -9,6 +9,8 @@ import javax.persistence.TypedQuery; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; +import org.hibernate.testing.DialectChecks; +import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.junit.Before; import org.junit.Test; @@ -20,6 +22,7 @@ import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; * @author Nathan Xu */ @TestForIssue( jiraKey = "HHH-14231" ) +@RequiresDialectFeature( DialectChecks.SupportsExpectedLobUsagePattern.class ) public class ScrollableResultsObjectArrayCastingTest extends BaseEntityManagerFunctionalTestCase { @Override @@ -31,7 +34,7 @@ public class ScrollableResultsObjectArrayCastingTest extends BaseEntityManagerFu public void SetUp() { doInJPA( this::entityManagerFactory, entityManager -> { Product product = new Product(); - product.binaryValue = "".getBytes(); + product.binaryValue = new byte[] { 1, 2, 3 }; entityManager.persist( product ); } ); }