Increase MaxPermSize for tests
This commit is contained in:
parent
9f8b59dfb6
commit
4b6b48dc34
6 changed files with 12 additions and 6 deletions
2
pom.xml
2
pom.xml
|
@ -595,7 +595,7 @@
|
|||
<version>2.16</version>
|
||||
<configuration>
|
||||
<forkMode>once</forkMode>
|
||||
<argLine>-Xms512m -Xmx512m</argLine>
|
||||
<argLine>-Xms512m -Xmx512m -XX:MaxPermSize=256m</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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.");
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue