Author: dgolovin
Date: 2007-06-28 13:15:47 -0400 (Thu, 28 Jun 2007)
New Revision: 2206
Modified:
trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
Log:
http://jira.jboss.org/jira/browse/EXIN-13
rsolvePlugin method is chaanged to fix test errors
Modified: trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2007-06-28 14:01:54 UTC
(rev 2205)
+++ trunk/tests/tests/org.jboss.tools.test/META-INF/MANIFEST.MF 2007-06-28 17:15:47 UTC
(rev 2206)
@@ -8,8 +8,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
- org.junit,
- org.jboss.tools.common
+ org.junit
Provide-Package: org.jboss.ide.tests.util
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.tests
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
===================================================================
---
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2007-06-28
14:01:54 UTC (rev 2205)
+++
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2007-06-28
17:15:47 UTC (rev 2206)
@@ -26,9 +26,14 @@
private boolean isPluginResolved (String pluginId)
{
Bundle bundle = Platform.getBundle(pluginId);
-
- assertNotNull(pluginId + " failed to load.", bundle);
-
+ assertNotNull(pluginId + " failed to load.");
+ try {
+ // In 3.3 when test case is running plug-in.getState always returns STARTING state
+ // to move plug-in in ACTIVE state even one class should be loaded from plug-in
+ bundle.loadClass("fake class");
+ } catch (Exception e) {
+ // It happen always because loaded class is not exists
+ }
return ((bundle.getState() & Bundle.RESOLVED) > 0) ||
((bundle.getState() & Bundle.ACTIVE) > 0);
}
@@ -36,23 +41,23 @@
private void assertPluginsResolved (String[] pluginIds)
{
for (int i = 0; i < pluginIds.length; i++) {
- assertTrue (isPluginResolved(pluginIds[i]));
+ assertTrue ("plugin '" + pluginIds[i] + "' is not
resolved",isPluginResolved(pluginIds[i]));
}
}
public void testCommonPluginsResolved ()
{
assertPluginsResolved(new String[] {
- rhdsNS+"common",
- rhdsNS+"common.gef",
- rhdsNS+"common.kb",
- rhdsNS+"common.model",
- rhdsNS+"common.model.ui",
- rhdsNS+"common.projecttemplates",
- rhdsNS+"common.text.ext",
- rhdsNS+"common.text.xml",
- rhdsNS+"common.verification",
- rhdsNS+"common.verification.ui",
+ rhdsNS+"common",
+ rhdsNS+"common.gef",
+ rhdsNS+"common.kb",
+ rhdsNS+"common.model",
+ rhdsNS+"common.model.ui",
+ rhdsNS+"common.projecttemplates",
+ rhdsNS+"common.text.ext",
+ rhdsNS+"common.text.xml",
+ rhdsNS+"common.verification",
+ rhdsNS+"common.verification.ui",
});
}