Author: dgolovin
Date: 2008-10-29 13:01:48 -0400 (Wed, 29 Oct 2008)
New Revision: 11303
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
fix JUnit tests exceptions in seam core tests. WorkbenchUntils.cloaseAllEditors() call was
added to avoid exceptions in opened java editors.
[java] org.osgi.service.prefs.BackingStoreException: Exception loading preferences
from: /seam_ear-ejb/.settings/org.eclipse.jdt.core.prefs.
[java] at
org.eclipse.core.internal.resources.ProjectPreferences.load(ProjectPreferences.java:460)
[java] at
org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:307)
[java] at
org.eclipse.core.internal.preferences.EclipsePreferences.getChild(EclipsePreferences.java:412)
[java] at
org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:541)
[java] at
org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:662)
[java] at org.eclipse.core.resources.ProjectScope.getNode(ProjectScope.java:67)
[java] at
org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EclipsePreferencesAdapter.getNode(JavaEditor.java:368)
[java] at
org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EclipsePreferencesAdapter.contains(JavaEditor.java:394)
[java] at
org.eclipse.ui.texteditor.ChainedPreferenceStore.getVisibleStore(ChainedPreferenceStore.java:529)
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-29
16:24:29 UTC (rev 11302)
+++
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-29
17:01:48 UTC (rev 11303)
@@ -32,6 +32,7 @@
import org.jboss.tools.seam.internal.core.project.facet.SeamProjectCreator;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
/**
* Base class for facet related tests; based on the facet test class found in
@@ -106,6 +107,7 @@
boolean oldAutoBuilding = true;
Exception last = null;
try {
+ WorkbenchUtils.closeAllEditors();
oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,
null);
JobUtils.waitForIdle();
Show replies by date