Fix ModelTest - forgot to close session and factory

This commit is contained in:
Stian Thorgersen 2013-09-20 15:20:34 +01:00
parent 32fcd46e08
commit 0c76a493b9

View file

@ -3,6 +3,7 @@ package org.keycloak.test;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -27,6 +28,13 @@ public class ModelTest extends AbstractKeycloakServerTest {
manager = new RealmManager(identitySession); manager = new RealmManager(identitySession);
} }
@After
public void after() throws Exception {
identitySession.getTransaction().commit();
identitySession.close();
factory.close();
}
@Test @Test
public void importExportRealm() { public void importExportRealm() {
RealmModel realm = manager.createRealm("original"); RealmModel realm = manager.createRealm("original");