[jboss-svn-commits] JBL Code SVN: r30173 - labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Nov 16 07:54:04 EST 2009
Author: whitingjr
Date: 2009-11-16 07:54:04 -0500 (Mon, 16 Nov 2009)
New Revision: 30173
Modified:
labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java
Log:
Replaced the assertion of the initial value.
Changed logging statements to assertions.
Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java 2009-11-16 12:53:21 UTC (rev 30172)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java 2009-11-16 12:54:04 UTC (rev 30173)
@@ -139,7 +139,6 @@
EntityManager emtest = null;
try
{
-
emtest = getEntityManagerFactory().createEntityManager();
//Assert.assertTrue(emtest.getTransaction().isActive());
Object[] result = (Object[])
@@ -153,11 +152,11 @@
Assert.assertEquals( result[0].getClass() , BigDecimal.class);
Assert.assertEquals(0 , ((BigDecimal)result[0]).compareTo( ((newItem.getInitialPrice().getValue()))));
// The SQL resultset mapping returns a BigInteger
- Assert.assertEquals(result[1], new BigDecimal("1"));
+ Assert.assertEquals(new BigDecimal( result[1].toString()).intValue(), new BigDecimal("1").intValue());
}
catch (PersistenceException pe)
{
- logger.error(pe.getMessage(), pe);
+ Assert.fail(pe.getMessage());
}
finally
{
@@ -170,13 +169,11 @@
}
}
catch (HibernateException e) {
- logger.error(e.getMessage(), e);
- throw e;
+ Assert.fail(e.getMessage());
}
catch (PersistenceException pe)
{
- logger.error(pe.getMessage(), pe);
- throw pe;
+ Assert.fail(pe.getMessage());
}
finally
{
More information about the jboss-svn-commits
mailing list