From 7107e7e31ad277984e904248478a442aa93ff36b Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Mon, 16 Oct 2006 19:33:51 +0000
Subject: [PATCH]
---
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java | 2 +-
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java | 2 +-
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java | 22 ++++++++++++++--------
3 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
index 95108a9..a839281 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
+++ b/opendj-sdk/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);
}
}
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
index 8d62a39..ed992d2 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/SearchOperationTestCase.java
+++ b/opendj-sdk/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();
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java
index 7847c63..ae01530 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/TestModifyDNOperation.java
+++ b/opendj-sdk/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();
--
Gitblit v1.10.0