HHH-6799 Fix EntityManager relates test harness that was closing a ServiceRegistry it did not open
This commit is contained in:
parent
19939cedf5
commit
53cae7ace7
|
@ -205,10 +205,7 @@ public abstract class BaseEntityManagerFunctionalTestCase extends BaseUnitTestCa
|
||||||
if ( entityManagerFactory != null ) {
|
if ( entityManagerFactory != null ) {
|
||||||
entityManagerFactory.close();
|
entityManagerFactory.close();
|
||||||
}
|
}
|
||||||
|
// Note we don't destroy the service registry as we are not the ones creating it
|
||||||
if ( serviceRegistry != null ) {
|
|
||||||
serviceRegistry.destroy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void releaseUnclosedEntityManagers() {
|
private void releaseUnclosedEntityManagers() {
|
||||||
|
|
|
@ -121,7 +121,7 @@ public abstract class AbstractEntityTest extends AbstractEnversTest {
|
||||||
public void close() {
|
public void close() {
|
||||||
closeEntityManager();
|
closeEntityManager();
|
||||||
emf.close();
|
emf.close();
|
||||||
serviceRegistry.destroy();
|
//NOTE we don't build the service registry so we don't destroy it
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityManager getEntityManager() {
|
public EntityManager getEntityManager() {
|
||||||
|
|
Loading…
Reference in New Issue