Author: vrubezhny
Date: 2010-11-19 10:23:49 -0500 (Fri, 19 Nov 2010)
New Revision: 26773
Modified:
trunk/seam/plugins/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
JBIDE-7690
org.jboss.tools.seam.ui.test.wizard.SeamCreateTestProjectTest JUnit Test doesn't clean
up its testing projects
Issue is fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-11-19
15:22:27 UTC (rev 26772)
+++
trunk/seam/plugins/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-11-19
15:23:49 UTC (rev 26773)
@@ -152,11 +152,15 @@
if(resource==null) throw new IllegalArgumentException();
if(resourcesToCleanup.contains(resource)) throw new IllegalArgumentException();
this.resourcesToCleanup.add(resource);
+// System.out.println("Resource is added to clean up list: " + resource);
}
protected final void addResourcesToCleanup(final IResource[] resource) {
if(resource==null) throw new IllegalArgumentException();
this.resourcesToCleanup.addAll(Arrays.asList(resource));
+// for (IResource r : resource) {
+// System.out.println("Resource is added to clean up list: " + r);
+// }
}
protected final void addTearDownOperation(final Runnable runnable) {
@@ -244,9 +248,11 @@
}
},new NullProgressMonitor());
-
- this.addResourcesToCleanup(seamProjectsSet.getAllProjects());
+ // Fix for JBIDE-JBIDE-7690: Let all the project to be created before we'll add
them to the clean up list
+ JobUtils.waitForIdle();
+ SeamProjectsSet seamAllProjectsSet = new SeamProjectsSet(fproj.getProject());
+ this.addResourcesToCleanup(seamAllProjectsSet.getAllProjects());
return fproj;
}