Author: jcosta(a)redhat.com
Date: 2009-04-21 07:48:01 -0400 (Tue, 21 Apr 2009)
New Revision: 16374
Modified:
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/callbacks/CallbacksTest.java
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/emops/FlushTest.java
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/lock/LockTest.java
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java
Log:
EJB-407 - Fixed tests which weren't closing the EM after finishing their work. For
branch v3_3_2_GA_CP
Modified:
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/callbacks/CallbacksTest.java
===================================================================
---
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/callbacks/CallbacksTest.java 2009-04-21
11:47:14 UTC (rev 16373)
+++
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/callbacks/CallbacksTest.java 2009-04-21
11:48:01 UTC (rev 16374)
@@ -113,6 +113,7 @@
em.flush();
assertNotNull( rc.getCreationDate() );
em.getTransaction().rollback();
+ em.close();
}
public void testCallBackListenersHierarchy() throws Exception {
Modified:
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/emops/FlushTest.java
===================================================================
---
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/emops/FlushTest.java 2009-04-21
11:47:14 UTC (rev 16373)
+++
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/emops/FlushTest.java 2009-04-21
11:48:01 UTC (rev 16374)
@@ -66,7 +66,10 @@
for (Decorate value : founds) {
assertTrue( names.contains( value.getPet().getName() ) );
}
+ manager.getTransaction().rollback();
+ manager.close();
+
}
public Dog createDog(String name, double weight, int bones, EntityManager manager) {
Modified:
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/lock/LockTest.java
===================================================================
---
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/lock/LockTest.java 2009-04-21
11:47:14 UTC (rev 16373)
+++
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/lock/LockTest.java 2009-04-21
11:48:01 UTC (rev 16374)
@@ -30,6 +30,8 @@
assertEquals( "surname", lock.getName() );
em.remove( lock );
em.getTransaction().commit();
+
+ em.close();
}
public void testLockWrite() throws Exception {
Modified:
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java
===================================================================
---
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java 2009-04-21
11:47:14 UTC (rev 16373)
+++
entitymanager/branches/v3_3_2_GA_CP/src/test/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java 2009-04-21
11:48:01 UTC (rev 16374)
@@ -42,6 +42,7 @@
em.getTransaction().begin();
em.remove( em.find( Book.class, book.id ) );
em.getTransaction().commit();
+ em.close();
}
// public void testTransactionalOperationsWhenTransactional() throws Exception {
Show replies by date