From 8196da2152209c8c628611aeeb4adae32079921e Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 25 Nov 2015 15:09:53 +0000
Subject: [PATCH] OPENDJ-2337 Remove old JE local-db backend code and JE changelog once we are happy with the new implementations
---
opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java | 67 ++++-----------------------------
1 files changed, 9 insertions(+), 58 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java b/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
index 1935ea1..ba89694 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -57,7 +57,9 @@
import org.opends.server.api.WorkQueue;
import org.opends.server.api.plugin.PluginType;
import org.opends.server.backends.MemoryBackend;
-import org.opends.server.backends.jeb.*;
+import org.opends.server.backends.pluggable.BackendImpl;
+import org.opends.server.backends.pluggable.EntryContainer;
+import org.opends.server.backends.pluggable.RootContainer;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
import org.opends.server.core.DirectoryServer;
@@ -865,22 +867,6 @@
for (EntryContainer ec : rootContainer.getEntryContainers())
{
ec.clear();
- assertEquals(ec.getHighestEntryID().longValue(), 0L);
- }
- rootContainer.resetNextEntryID();
- return true;
- }
- }
- else if (b instanceof org.opends.server.backends.pluggable.BackendImpl)
- {
- final org.opends.server.backends.pluggable.BackendImpl backend =
- (org.opends.server.backends.pluggable.BackendImpl) b;
- final org.opends.server.backends.pluggable.RootContainer rootContainer = backend.getRootContainer();
- if (rootContainer != null)
- {
- for (org.opends.server.backends.pluggable.EntryContainer ec : rootContainer.getEntryContainers())
- {
- ec.clear();
// assertEquals(ec.getHighestEntryID().longValue(), 0L);
}
rootContainer.resetNextEntryID();
@@ -891,36 +877,6 @@
}
/**
- * This was used to track down which test was trashing the indexes. We left it
- * here because it might be useful again.
- */
- public static void printUntrustedIndexes()
- {
- try {
- BackendImpl backend = (BackendImpl)DirectoryServer.getBackend("userRoot");
- if (backend == null) {
- return;
- }
- RootContainer rootContainer = backend.getRootContainer();
- for (EntryContainer ec : rootContainer.getEntryContainers())
- {
- List<DatabaseContainer> databases = new ArrayList<>();
- ec.listDatabases(databases);
- for (DatabaseContainer dbContainer: databases) {
- if (dbContainer instanceof Index) {
- Index index = (Index)dbContainer;
- if (!index.isTrusted()) {
- originalSystemErr.println("ERROR: The index " + index + " is no longer trusted.");
- }
- }
- }
- }
- } catch (Exception e) {
- e.printStackTrace(originalSystemErr);
- }
- }
-
- /**
* Create a temporary directory with the specified prefix.
*
* @param prefix
@@ -931,19 +887,14 @@
*/
public static File createTemporaryDirectory(String prefix)
throws IOException {
- File tempDirectory = File.createTempFile(prefix, null);
-
- if (!tempDirectory.delete()) {
- throw new IOException("Unable to delete temporary file: "
- + tempDirectory);
+ File tmpDir = File.createTempFile(prefix, null);
+ if (!tmpDir.delete()) {
+ throw new IOException("Unable to delete temporary file: " + tmpDir);
}
-
- if (!tempDirectory.mkdir()) {
- throw new IOException("Unable to create temporary directory: "
- + tempDirectory);
+ if (!tmpDir.mkdir()) {
+ throw new IOException("Unable to create temporary directory: " + tmpDir);
}
-
- return tempDirectory;
+ return tmpDir;
}
/**
--
Gitblit v1.10.0