diff --git a/pom.xml b/pom.xml
index d43ce03c7d..bab4f97b85 100755
--- a/pom.xml
+++ b/pom.xml
@@ -595,7 +595,7 @@
2.16
once
- -Xms512m -Xmx512m
+ -Xms512m -Xmx512m -XX:MaxPermSize=256m
diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java b/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java
index 635c81764c..ff5b7791e1 100644
--- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java
+++ b/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/KerberosEmbeddedServer.java
@@ -27,7 +27,7 @@ import org.jboss.logging.Logger;
*/
public class KerberosEmbeddedServer extends LDAPEmbeddedServer {
- private static final Logger log = Logger.getLogger(LDAPEmbeddedServer.class);
+ private static final Logger log = Logger.getLogger(KerberosEmbeddedServer.class);
private final String kerberosRealm;
private final int kdcPort;
@@ -117,7 +117,7 @@ public class KerberosEmbeddedServer extends LDAPEmbeddedServer {
protected void stopKerberosServer() {
- log.info("Stoping Kerberos server.");
+ log.info("Stopping Kerberos server.");
kdcServer.stop();
}
diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java b/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java
index 9c18288ebf..1bf4f80df2 100644
--- a/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java
+++ b/testsuite/integration/src/main/java/org/keycloak/testutils/ldap/LDAPEmbeddedServer.java
@@ -150,7 +150,7 @@ public class LDAPEmbeddedServer {
}
final String ldifContent = StrSubstitutor.replace(StreamUtil.readString(is), map);
- log.info("Importing LDIF: " + ldifContent);
+ log.info("Content of LDIF: " + ldifContent);
final SchemaManager schemaManager = directoryService.getSchemaManager();
for (LdifEntry ldifEntry : new LdifReader(IOUtils.toInputStream(ldifContent))) {
@@ -170,13 +170,13 @@ public class LDAPEmbeddedServer {
protected void stopLdapServer() {
- log.info("Stoping LDAP server.");
+ log.info("Stopping LDAP server.");
ldapServer.stop();
}
protected void shutdownDirectoryService() throws Exception {
- log.info("Stoping Directory service.");
+ log.info("Stopping Directory service.");
directoryService.shutdown();
log.info("Removing Directory service workfiles.");
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/AbstractKerberosTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/AbstractKerberosTest.java
index 2f8cb01b06..0bb3cd2587 100644
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/AbstractKerberosTest.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/AbstractKerberosTest.java
@@ -93,6 +93,7 @@ public abstract class AbstractKerberosTest {
Assert.assertEquals(KerberosConstants.NEGOTIATE, response.getHeaderString(HttpHeaders.WWW_AUTHENTICATE));
String responseText = response.readEntity(String.class);
responseText.contains("Log in to test");
+ response.close();
}
@@ -113,6 +114,8 @@ public abstract class AbstractKerberosTest {
driver.navigate().to(location);
Assert.assertEquals(AppPage.RequestType.AUTH_RESPONSE, appPage.getRequestType());
Assert.assertNotNull(oauth.getCurrentQuery().get(OAuth2Constants.CODE));
+
+ spnegoResponse.close();
}
@@ -158,6 +161,7 @@ public abstract class AbstractKerberosTest {
.detail(Details.AUTH_METHOD, "spnego")
.detail(Details.USERNAME, "jduke")
.assertEvent();
+ spnegoResponse.close();
}
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java
index 49efabc073..1f1092a86b 100644
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosLdapTest.java
@@ -141,6 +141,7 @@ public class KerberosLdapTest extends AbstractKerberosTest {
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated"));
changePasswordPage.logout();
+ spnegoResponse.close();
events.clear();
}
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java
index 0decc0b4d3..65a753ea3d 100644
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/KerberosStandaloneTest.java
@@ -106,6 +106,7 @@ public class KerberosStandaloneTest extends AbstractKerberosTest {
String responseText = spnegoResponse.readEntity(String.class);
Assert.assertTrue(responseText.contains("You need to update your user profile to activate your account."));
Assert.assertTrue(responseText.contains("hnelson@keycloak.org"));
+ spnegoResponse.close();
// Assert user was imported and has required action on him
assertUser("hnelson", "hnelson@keycloak.org", null, null, true);