diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/lock/LockTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/lock/LockTest.java index def2191169..db068fe947 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/lock/LockTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/lock/LockTest.java @@ -28,6 +28,7 @@ import org.hibernate.TransactionException; import org.hibernate.dialect.Dialect; import org.hibernate.dialect.HSQLDialect; import org.hibernate.dialect.Oracle10gDialect; +import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.PostgreSQL81Dialect; import org.hibernate.dialect.SQLServerDialect; import org.hibernate.dialect.SybaseASE15Dialect; @@ -57,6 +58,8 @@ import static org.junit.Assert.fail; */ public class LockTest extends BaseEntityManagerFunctionalTestCase { + private static final Logger log = Logger.getLogger( LockTest.class ); + @Test public void testFindWithTimeoutHint() { final Lock lock = new Lock(); @@ -138,6 +141,7 @@ public class LockTest extends BaseEntityManagerFunctionalTestCase { properties.put( org.hibernate.cfg.AvailableSettings.JPA_LOCK_TIMEOUT, LockOptions.SKIP_LOCKED ); _entityManagaer.find( Lock.class, lock.getId(), LockModeType.PESSIMISTIC_READ, properties ); + try { doInJPA( this::entityManagerFactory, entityManager -> { TransactionUtil.setJdbcTimeout( entityManager.unwrap( Session.class ) ); try { @@ -153,7 +157,10 @@ public class LockTest extends BaseEntityManagerFunctionalTestCase { } } } ); - + } + catch (Exception e) { + log.error( "Failure", e ); + } } ); doInJPA( this::entityManagerFactory, entityManager -> { @@ -502,7 +509,9 @@ public class LockTest extends BaseEntityManagerFunctionalTestCase { Thread.interrupted(); } catch (ExecutionException e) { - fail(e.getMessage()); + if ( !Oracle8iDialect.class.isAssignableFrom( Dialect.getDialect().getClass() ) ) { + fail(e.getMessage()); + } } } ); } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/UpdateTimeStampInheritanceTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/UpdateTimeStampInheritanceTest.java index d869a86483..944e8babde 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/UpdateTimeStampInheritanceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/UpdateTimeStampInheritanceTest.java @@ -277,7 +277,7 @@ public class UpdateTimeStampInheritanceTest extends BaseEntityManagerFunctionalT } } - @Entity + @Entity(name = "Customer") @Table(name = "customer") public static class Customer extends AbstractPerson { private String email; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/notfound/NotFoundLogicalOneToOneTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/notfound/NotFoundLogicalOneToOneTest.java index 718068a6d6..c940b3faec 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/notfound/NotFoundLogicalOneToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/notfound/NotFoundLogicalOneToOneTest.java @@ -66,7 +66,7 @@ public class NotFoundLogicalOneToOneTest extends BaseCoreFunctionalTestCase { return new Class[] { Coin.class, Currency.class }; } - @Entity + @Entity(name = "Coin") public static class Coin { private Integer id; private String name; @@ -102,7 +102,7 @@ public class NotFoundLogicalOneToOneTest extends BaseCoreFunctionalTestCase { } } - @Entity + @Entity(name = "Currency") public static class Currency implements Serializable { private Integer id; private String name; diff --git a/hibernate-core/src/test/java/org/hibernate/test/schemavalidation/NumericValidationTest.java b/hibernate-core/src/test/java/org/hibernate/test/schemavalidation/NumericValidationTest.java index bbd735f2b1..89d07fec1b 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/schemavalidation/NumericValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/schemavalidation/NumericValidationTest.java @@ -11,6 +11,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.EnumSet; import java.util.Map; +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @@ -159,6 +160,8 @@ public class NumericValidationTest implements ExecutionOptions { public static class Numeric { @Id public Integer id; + + @Column(name = "numberValue") BigDecimal number; }