Ejemplo n.º 1
0
  /**
   * Start an in-process Apache Directory Server.
   *
   * @param port the port on which the server will be listening.
   * @param defaultPartitionSuffix The default base suffix that will be used for the LDAP server.
   * @param defaultPartitionName The name to use in the directory server configuration for the
   *     default base suffix.
   * @param principal The principal to use when starting the directory server.
   * @param credentials The credentials to use when starting the directory server.
   * @param extraSchemas Set of extra schemas to add to the bootstrap schemas of ApacheDS. May be
   *     <code>null</code>.
   * @return An unusable DirContext instance.
   * @throws NamingException If anything goes wrong when starting the server.
   * @deprecated use {@link #startEmbeddedServer(int, String, String)} instead.
   */
  public static DirContext startApacheDirectoryServer(
      int port,
      String defaultPartitionSuffix,
      String defaultPartitionName,
      String principal,
      String credentials,
      Set extraSchemas)
      throws NamingException {

    startEmbeddedServer(port, defaultPartitionSuffix, defaultPartitionName);
    return new DummyDirContext();
  }
Ejemplo n.º 2
0
 @BeforeClass
 public static void setUpClass() throws Exception {
   // Start an LDAP server and import test data
   LdapTestUtils.startEmbeddedServer(PORT, baseName.toString(), "odm-test");
 }