Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbvosburgh2009-12-02 12:24:13 -0500
committerbvosburgh2009-12-02 12:24:13 -0500
commitc1fec439b4a1bd2d9a5574d8877462e7d9feff7e (patch)
tree87e30f804e93ff0ab58fda7a36bd65e4a11fcfdf
parent34f061ab725b89c7b515f3ed9c2720fbd24677f6 (diff)
downloadwebtools.dali-c1fec439b4a1bd2d9a5574d8877462e7d9feff7e.tar.gz
webtools.dali-c1fec439b4a1bd2d9a5574d8877462e7d9feff7e.tar.xz
webtools.dali-c1fec439b4a1bd2d9a5574d8877462e7d9feff7e.zip
hack around problems deleting test project
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java
index 81c8d7f83b..c3bcb8b17d 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java
@@ -84,10 +84,27 @@ public abstract class AnnotationTestCase extends TestCase {
@Override
protected void tearDown() throws Exception {
// this.dumpSource();
- this.javaProject.getProject().delete(true, true, null);
+ this.deleteProject();
TestTools.clear(this);
super.tearDown();
}
+
+ protected void deleteProject() throws Exception {
+ int i = 1;
+ boolean deleted = false;
+ while ( ! deleted) {
+ try {
+ this.javaProject.getProject().delete(true, true, null);
+ deleted = true;
+ } catch (CoreException ex) {
+ if (i == 4) {
+ throw ex;
+ }
+ Thread.sleep(1000);
+ i++;
+ }
+ }
+ }
protected void dumpSource(ICompilationUnit cu) throws Exception {
System.out.println("*** " + this.getName() + " ****");

Back to the top