Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
The following code snippet tries to load the OSGi bundle from the filesystem
final URL url = new URL(mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.1.0").getURL()); final InputStream is = url.openStream(); Bundle osgiBundle = null; try { osgiBundle = this.bundleContext.installBundle(url.toExternalForm(), is); } finally { try { is.close(); } catch ( final IOException ignore) {} } assertNotNull(osgiBundle); assertEquals(Bundle.INSTALLED, osgiBundle.getState());
Even though it's wrapped in a mavenBundle call, the bundle is not actually downloaded, so if the bundle is not available locally the test will fail.