Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-08-22 19:49:47 -0400
committerSergey Prigogin2012-08-22 19:59:20 -0400
commitc41f1dc9343809d8fd58b3fce69abf50492f925a (patch)
tree287dec37136550714e6ff8a15b9c2b5edc5f127f
parent3decf1fe32224a3e4aed8479117f3dc70fc0dc10 (diff)
downloadorg.eclipse.cdt-c41f1dc9343809d8fd58b3fce69abf50492f925a.tar.gz
org.eclipse.cdt-c41f1dc9343809d8fd58b3fce69abf50492f925a.tar.xz
org.eclipse.cdt-c41f1dc9343809d8fd58b3fce69abf50492f925a.zip
Delete the created project as part of test tear down.
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java
index d9cc6b7831..4d200c290b 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java
@@ -33,6 +33,7 @@ import org.eclipse.cdt.internal.core.CCoreInternals;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -49,7 +50,7 @@ public class PDOMSearchTest extends PDOMTestBase {
return o1.getName().compareTo(o2.getName());
}};
- protected ICProject project;
+ protected ICProject project;
protected PDOM pdom;
protected IProgressMonitor NULL_MONITOR = new NullProgressMonitor();
protected IndexFilter INDEX_FILTER = IndexFilter.ALL_DECLARED;
@@ -60,16 +61,17 @@ public class PDOMSearchTest extends PDOMTestBase {
@Override
protected void setUp() throws Exception {
- if (pdom == null) {
- ICProject project = createProject("searchTests", true);
- pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
- }
+ project = createProject("searchTests", true);
+ pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
pdom.acquireReadLock();
}
@Override
protected void tearDown() throws Exception {
pdom.releaseReadLock();
+ if (project != null) {
+ project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+ }
}
/**

Back to the top