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");