From a5ce1b53bf9304c08bb51639b48bb77085cd62b3 Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Sun, 02 Sep 2007 04:00:42 +0000
Subject: [PATCH] There are several improvements to the unit test framework in this commit.

---
 opends/src/server/org/opends/server/backends/jeb/EntryContainer.java |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
index 126224c..01f3ce6 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -4362,6 +4362,44 @@
       {
         db.open();
       }
+
+      Transaction txn = null;
+      try
+      {
+        txn = beginTransaction();
+        for(DatabaseContainer db : databases)
+        {
+          if (db instanceof Index)
+          {
+            Index index = (Index)db;
+            index.setTrusted(txn, true);
+          }
+        }
+        transactionCommit(txn);
+      }
+      catch(Exception de)
+      {
+        if (debugEnabled())
+        {
+          TRACER.debugCaught(DebugLogLevel.ERROR, de);
+        }
+
+        // This is mainly used during the unit tests, so it's not essential.
+        try
+        {
+          if (txn != null)
+          {
+            transactionAbort(txn);
+          }
+        }
+        catch (Exception e)
+        {
+          if (debugEnabled())
+          {
+            TRACER.debugCaught(DebugLogLevel.ERROR, de);
+          }
+        }
+      }
     }
 
     return count;

--
Gitblit v1.10.0