Merge pull request #4125 from mtrue01/mtrue01branch

Fixes for ApacheDS
This commit is contained in:
Marek Posolda 2017-05-15 11:03:24 +02:00 committed by GitHub
commit 9804aaf796
3 changed files with 9 additions and 8 deletions

View file

@ -38,10 +38,11 @@ public class LDAPTestConfiguration {
private String connectionPropertiesLocation;
private int sleepTime;
private boolean startEmbeddedLdapLerver = true;
private boolean startEmbeddedLdapServer = true;
private Map<String, String> config;
protected static final Map<String, String> PROP_MAPPINGS = new HashMap<String, String>();
protected static final Map<String, String> DEFAULT_VALUES = new HashMap<String, String>();
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() {

View file

@ -61,8 +61,7 @@ public class LDAPLegacyImportTest {
// This test is executed just for the embedded LDAP server
private static LDAPRule ldapRule = new LDAPRule((Map<String, String> 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;

View file

@ -88,7 +88,7 @@ public class LDAPRule implements TestRule {
return true;
}
if (ldapTestConfiguration.isStartEmbeddedLdapLerver()) {
if (ldapTestConfiguration.isStartEmbeddedLdapServer()) {
ldapEmbeddedServer = createServer();
ldapEmbeddedServer.init();
ldapEmbeddedServer.start();