From 0c76a493b94fdb650b8a2195936dc2ea4de790c0 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 20 Sep 2013 15:20:34 +0100 Subject: [PATCH] Fix ModelTest - forgot to close session and factory --- services/src/test/java/org/keycloak/test/ModelTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/src/test/java/org/keycloak/test/ModelTest.java b/services/src/test/java/org/keycloak/test/ModelTest.java index b69924af76..62fa870df6 100644 --- a/services/src/test/java/org/keycloak/test/ModelTest.java +++ b/services/src/test/java/org/keycloak/test/ModelTest.java @@ -3,6 +3,7 @@ package org.keycloak.test; import java.util.Iterator; import java.util.List; +import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -27,6 +28,13 @@ public class ModelTest extends AbstractKeycloakServerTest { manager = new RealmManager(identitySession); } + @After + public void after() throws Exception { + identitySession.getTransaction().commit(); + identitySession.close(); + factory.close(); + } + @Test public void importExportRealm() { RealmModel realm = manager.createRealm("original");