diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPTestConfiguration.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPTestConfiguration.java index f4cbc2283b..ba47fca448 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPTestConfiguration.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPTestConfiguration.java @@ -38,10 +38,11 @@ public class LDAPTestConfiguration { private String connectionPropertiesLocation; private int sleepTime; - private boolean startEmbeddedLdapLerver = true; + private boolean startEmbeddedLdapServer = true; private Map config; protected static final Map PROP_MAPPINGS = new HashMap(); + protected static final Map DEFAULT_VALUES = new HashMap(); static { @@ -124,9 +125,10 @@ public class LDAPTestConfiguration { config.put(propertyName, value); } - startEmbeddedLdapLerver = Boolean.parseBoolean(p.getProperty("idm.test.ldap.start.embedded.ldap.server", "true")); + startEmbeddedLdapServer = Boolean.parseBoolean(p.getProperty("idm.test.ldap.start.embedded.ldap.server", "true")); sleepTime = Integer.parseInt(p.getProperty("idm.test.ldap.sleepTime", "1000")); - log.info("Start embedded server: " + startEmbeddedLdapLerver); + config.put("startEmbeddedLdapServer", Boolean.toString(startEmbeddedLdapServer)); + log.info("Start embedded server: " + startEmbeddedLdapServer); log.info("Read config: " + config); } @@ -138,8 +140,8 @@ public class LDAPTestConfiguration { this.connectionPropertiesLocation = connectionPropertiesLocation; } - public boolean isStartEmbeddedLdapLerver() { - return startEmbeddedLdapLerver; + public boolean isStartEmbeddedLdapServer() { + return startEmbeddedLdapServer; } public int getSleepTime() { diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/storage/ldap/LDAPLegacyImportTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/storage/ldap/LDAPLegacyImportTest.java index 39b93fb590..086bf257ed 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/storage/ldap/LDAPLegacyImportTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/federation/storage/ldap/LDAPLegacyImportTest.java @@ -61,8 +61,7 @@ public class LDAPLegacyImportTest { // This test is executed just for the embedded LDAP server private static LDAPRule ldapRule = new LDAPRule((Map ldapConfig) -> { - String connectionURL = ldapConfig.get(LDAPConstants.CONNECTION_URL); - return !"ldap://localhost:10389".equals(connectionURL); + return Boolean.parseBoolean(ldapConfig.get("startEmbeddedLdapServer")); }); private static ComponentModel ldapModel = null; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java index 6dbc938ec2..7b217b66f9 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/LDAPRule.java @@ -88,7 +88,7 @@ public class LDAPRule implements TestRule { return true; } - if (ldapTestConfiguration.isStartEmbeddedLdapLerver()) { + if (ldapTestConfiguration.isStartEmbeddedLdapServer()) { ldapEmbeddedServer = createServer(); ldapEmbeddedServer.init(); ldapEmbeddedServer.start();