Author: steve.ebersole(a)jboss.com
Date: 2010-05-21 13:57:21 -0400 (Fri, 21 May 2010)
New Revision: 19583
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/mappedsuperclass/intermediate/IntermediateMappedSuperclassTest.java
core/trunk/parent/pom.xml
Log:
HHH-5200 - Prepare to use H2 as the default testing datbase
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java
===================================================================
---
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java 2010-05-21
15:48:20 UTC (rev 19582)
+++
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java 2010-05-21
17:57:21 UTC (rev 19583)
@@ -22,10 +22,21 @@
try {
s.persist( ch );
s.flush();
+ if ( getDialect().supportsColumnCheck() ) {
+ fail( "expecting SQL constraint violation" );
+ }
}
catch ( ConstraintViolationException e ) {
fail("invalid object should not be validated");
}
+ catch ( org.hibernate.exception.ConstraintViolationException e ) {
+ if ( getDialect().supportsColumnCheck() ) {
+ // expected
+ }
+ else {
+ fail( "Unexpected SQL constraint violation [" + e.getConstraintName() +
"] : " + e.getSQLException() );
+ }
+ }
tx.rollback();
s.close();
}
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/mappedsuperclass/intermediate/IntermediateMappedSuperclassTest.java
===================================================================
---
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/mappedsuperclass/intermediate/IntermediateMappedSuperclassTest.java 2010-05-21
15:48:20 UTC (rev 19582)
+++
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/mappedsuperclass/intermediate/IntermediateMappedSuperclassTest.java 2010-05-21
17:57:21 UTC (rev 19583)
@@ -40,7 +40,7 @@
}
public void testGetOnIntermediateMappedSuperclass() {
- final BigDecimal withdrawalLimit = new BigDecimal( 1000 );
+ final BigDecimal withdrawalLimit = new BigDecimal( 1000.00 ).setScale( 2 );
Session session = openSession();
session.beginTransaction();
SavingsAccount savingsAccount = new SavingsAccount( "123", withdrawalLimit
);
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2010-05-21 15:48:20 UTC (rev 19582)
+++ core/trunk/parent/pom.xml 2010-05-21 17:57:21 UTC (rev 19583)
@@ -568,7 +568,7 @@
<profile>
<id>hsqldb</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
@@ -591,7 +591,7 @@
<profile>
<id>h2</id>
<activation>
- <activeByDefault>false</activeByDefault>
+ <activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
Show replies by date