From e3dd6252cc2e529b505b0d205374f0bb5e8f57ea Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Tue, 13 Oct 2009 16:25:04 +0000
Subject: [PATCH] - get rid of ReSynchTestreject test garbage leftover at the root of the source tree; create and cleanup a temporary test folder for resync test.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java
index bcfc8d6..13f0664 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java
@@ -69,6 +69,8 @@
protected static final String EXAMPLE_DN = "dc=example,dc=com";
+ private File reSyncTempDir;
+
/**
* Set up the environment for performing the tests in this Class.
*
@@ -80,6 +82,8 @@
{
super.setUp();
+ reSyncTempDir = TestCaseUtils.createTemporaryDirectory("resynctest");
+
/*
* - Configure replication
* - Do some changes.
@@ -223,8 +227,8 @@
// we do test something.
connection.processDelete(DN.decode("dc=fooUniqueName2," + EXAMPLE_DN));
- String buildRoot = System.getProperty(TestCaseUtils.PROPERTY_BUILD_ROOT);
- String path = "ReSynchTest";
+ String path = reSyncTempDir.getAbsolutePath() + File.pathSeparator +
+ "ReSynchTest";
task("dn: ds-task-id=" + UUID.randomUUID()
+ ",cn=Scheduled Tasks,cn=Tasks\n"
@@ -271,6 +275,8 @@
// Clear the backend
LDAPReplicationDomain.clearJEBackend(false, "userRoot", EXAMPLE_DN);
+ TestCaseUtils.deleteDirectory(reSyncTempDir);
+
paranoiaCheck();
}
}
--
Gitblit v1.10.0