From 5d650a123e46c0c86fe3e440fc9dbf04cd831fc9 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 15 Jun 2011 15:51:32 +0000
Subject: [PATCH] Tidy up unit-tests so that not all backends are always enabled, and replication related databases are deleted after tests.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
index 46b30bb..6299768 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
@@ -23,9 +23,11 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.server.replication;
+import java.io.File;
import static org.opends.server.config.ConfigConstants.ATTR_TASK_COMPLETION_TIME;
import static org.opends.server.config.ConfigConstants.ATTR_TASK_INITIALIZE_DONE;
import static org.opends.server.config.ConfigConstants.ATTR_TASK_INITIALIZE_LEFT;
@@ -83,6 +85,7 @@
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
import org.opends.server.util.Base64;
+import org.opends.server.util.StaticUtils;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -1682,6 +1685,8 @@
{
changelog1.clearDb();
changelog1.remove();
+ StaticUtils.recursiveDelete(new File(DirectoryServer.getInstanceRoot(),
+ changelog1.getDbDirName()));
changelog1 = null;
}
@@ -1689,6 +1694,8 @@
{
changelog2.clearDb();
changelog2.remove();
+ StaticUtils.recursiveDelete(new File(DirectoryServer.getInstanceRoot(),
+ changelog2.getDbDirName()));
changelog2 = null;
}
@@ -1696,6 +1703,8 @@
{
changelog3.clearDb();
changelog3.remove();
+ StaticUtils.recursiveDelete(new File(DirectoryServer.getInstanceRoot(),
+ changelog3.getDbDirName()));
changelog3 = null;
}
--
Gitblit v1.10.0