mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

dugan
16.33.2006 32cabd6ac2e9f69242f9533789369f81e652b27c

3 files modified
26 ■■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java 22 ●●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java 2 ●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java 2 ●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -143,8 +143,8 @@
    testRoot.mkdirs();
    String[] subDirectories = { "bak", "bin", "changelogDb", "classes",
                                "config", "db", "ldif", "lib", "locks",
                                "logs" };
                                "config", "db", "db_verify", "ldif", "lib",
                                "locks", "logs" };
    for (String s : subDirectories)
    {
      new File(testRoot, s).mkdir();
@@ -330,17 +330,23 @@
  }
  /**
   * Clears all the entries from the userRoot JE backend.
   * Clears all the entries from the JE backend determined by the
   * be id passed into the method.
   * @param  createBaseEntry  Indicate whether to automatically create the base
   *                          entry and add it to the backend.
   *
   *
   * @param beID  The be id to clear.
   *
   * @param dn   The suffix of the backend to create if the the createBaseEntry
   *             boolean is true.
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  public static void clearJEBackend(boolean createBaseEntry)
  public static void clearJEBackend(boolean createBaseEntry, String beID, String dn)
       throws Exception
  {
    BackendImpl backend = (BackendImpl)DirectoryServer.getBackend("userRoot");
    BackendImpl backend = (BackendImpl)DirectoryServer.getBackend(beID);
    DN[] baseDNs = backend.getBaseDNs();
    ConfigEntry configEntry = TaskUtils.getConfigEntry(backend);
@@ -372,9 +378,9 @@
    if (createBaseEntry)
    {
      DN baseDN = DN.decode("dc=example,dc=com");
      DN baseDN = DN.decode(dn);
      Entry e = createEntry(baseDN);
      backend = (BackendImpl)DirectoryServer.getBackend("userRoot");
      backend = (BackendImpl)DirectoryServer.getBackend(beID);
      backend.addEntry(e, null);
    }
  }
opends/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
@@ -65,7 +65,7 @@
  public void setUp() throws Exception
  {
    TestCaseUtils.startServer();
    TestCaseUtils.clearJEBackend(true);
    TestCaseUtils.clearJEBackend(true,"userRoot","dc=example,dc=com");
    InternalClientConnection connection =
         InternalClientConnection.getRootConnection();
opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java
@@ -60,7 +60,7 @@
  public void setUp() throws Exception
  {
    TestCaseUtils.startServer();
    TestCaseUtils.clearJEBackend(false);
    TestCaseUtils.clearJEBackend(false, "userRoot", "dc=example,dc=com");
    InternalClientConnection connection =
         InternalClientConnection.getRootConnection();