You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2009/04/16 15:54:15 UTC
[jira] Resolved: (FELIX-972) Bundle gets wired to an already
uninstalled bundle
[ https://issues.apache.org/jira/browse/FELIX-972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Diesler resolved FELIX-972.
----------------------------------
Resolution: Won't Fix
> Bundle gets wired to an already uninstalled bundle
> --------------------------------------------------
>
> Key: FELIX-972
> URL: https://issues.apache.org/jira/browse/FELIX-972
> Project: Felix
> Issue Type: Bug
> Affects Versions: felix-1.4.1
> Reporter: Thomas Diesler
>
> It seems that the order on uninstall matters
> B, X - is ok
> X, B - fails
> /**
> * [JBOSGI-39] Bundle undeploy does not clean up properly
> *
> * https://jira.jboss.org/jira/browse/JBOSGI-39
> *
> * Bundle B depends on bundle X.
> *
> * B ---> X
> *
> * @author thomas.diesler@jboss.com
> * @since 04-Mar-2009
> */
> public class OSGI39EmbeddedTestCase extends IntegrationTest
> {
> static OSGiBootstrapProvider bootProvider;
>
> @Override
> protected OSGiBootstrapProvider getBootstrapProvider()
> {
> if (bootProvider == null)
> bootProvider = createBootstrapProvider();
>
> return bootProvider;
> }
> public void testFirstRun() throws Exception
> {
> installBBeforeX();
> }
> public void testSecondRun() throws Exception
> {
> installBBeforeX();
> }
> private void installBBeforeX() throws Exception
> {
> OSGiFramework framework = getBootstrapProvider().getFramework();
> BundleContext sysContext = framework.getSystemBundleContext();
>
> Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
> assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
>
> try
> {
> bundleB.start();
> fail("Unresolved constraint expected");
> }
> catch (BundleException ex)
> {
> // expected
> }
>
> Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
>
> bundleB.start();
>
> assertEquals("Bundle resolved", Bundle.RESOLVED, bundleX.getState());
> assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
> // Uninstall X before B
> bundleX.uninstall();
> bundleB.uninstall();
> }
> Test set: org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase
> -------------------------------------------------------------------------------
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.989 sec <<< FAILURE!
> testSecondRun(org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase) Time elapsed: 0.015 sec <<< FAILURE!
> junit.framework.AssertionFailedError: Unresolved constraint expected
> at junit.framework.Assert.fail(Assert.java:47)
> at org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase.installBBeforeX(OSGI39EmbeddedTestCase.java:79)
> at org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase.testSecondRun(OSGI39EmbeddedTestCase.java:65)
> 2009-03-05 08:42:00,284 DEBUG [org.jboss.osgi.spi.junit.OSGiTest] ### START org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase.testFirstRun
> 2009-03-05 08:42:04,173 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 1.0 -> org.jboss.test.osgi.jbosgi38.bundleB -> 1.0
> 2009-03-05 08:42:04,173 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 1.0 -> org.jboss.test.osgi.jbosgi38.bundleX -> 2.0
> 2009-03-05 08:42:04,173 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 1.0 -> org.osgi.framework -> 0
> 2009-03-05 08:42:04,173 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 2.0 -> org.jboss.test.osgi.jbosgi38.bundleX -> 2.0
> 2009-03-05 08:42:04,187 DEBUG [org.jboss.osgi.spi.junit.OSGiTest] ### END org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase.testFirstRun
> 2009-03-05 08:42:04,194 DEBUG [org.jboss.osgi.spi.junit.OSGiTest] ### START org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase.testSecondRun
> 2009-03-05 08:42:04,200 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 3.0 -> org.jboss.test.osgi.jbosgi38.bundleB -> 3.0
> 2009-03-05 08:42:04,200 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 3.0 -> org.jboss.test.osgi.jbosgi38.bundleX -> 2.0
> 2009-03-05 08:42:04,200 DEBUG [org.jboss.osgi.felix.framework.FelixLogger] WIRE: 3.0 -> org.osgi.framework -> 0
> 2009-03-05 08:42:04,203 DEBUG [org.jboss.osgi.spi.junit.OSGiTest] ### END org.jboss.test.osgi.jbosgi39.OSGI39EmbeddedTestCase.testSecondRun
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.