HHH-6799 Fix EntityManager relates test harness that was closing a ServiceRegistry it did not open

This commit is contained in:
Emmanuel Bernard 2011-11-03 21:14:11 +01:00
parent 19939cedf5
commit 53cae7ace7
2 changed files with 2 additions and 5 deletions

View File

@ -205,10 +205,7 @@ public abstract class BaseEntityManagerFunctionalTestCase extends BaseUnitTestCa
if ( entityManagerFactory != null ) {
entityManagerFactory.close();
}
if ( serviceRegistry != null ) {
serviceRegistry.destroy();
}
// Note we don't destroy the service registry as we are not the ones creating it
}
private void releaseUnclosedEntityManagers() {

View File

@ -121,7 +121,7 @@ public abstract class AbstractEntityTest extends AbstractEnversTest {
public void close() {
closeEntityManager();
emf.close();
serviceRegistry.destroy();
//NOTE we don't build the service registry so we don't destroy it
}
public EntityManager getEntityManager() {