HHH-5200 - Prepare to use H2 as the default testing datbase

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19583 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2010-05-21 17:57:21 +00:00
parent 06f13dd4dc
commit 96664aeb2f
3 changed files with 14 additions and 3 deletions

View File

@ -22,10 +22,21 @@ public class DDLWithoutCallbackTest extends TestCase {
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();
}

View File

@ -40,7 +40,7 @@ public class IntermediateMappedSuperclassTest extends TestCase {
}
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 );

View File

@ -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>