From 32cabd6ac2e9f69242f9533789369f81e652b27c Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Mon, 16 Oct 2006 19:33:51 +0000
Subject: [PATCH]
---
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
index 95108a9..a839281 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
+++ b/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);
}
}
--
Gitblit v1.10.0