* Tests that adding the dependency for a bundle in an update package causes the depending bundle to be resolved and started.
*/
@Test
public void testInstallBundleWithDependencyInPackageUpdateOk() throws Exception
{
DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
// missing bundle1 as dependency...
dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")));
DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
assertNotNull("No deployment package returned?!", dp1);
awaitRefreshPackagesEvent();
Bundle bundle = dp1.getBundle(getSymbolicName("bundle2"));
assertNotNull("Failed to obtain bundle from deployment package?!", bundle);
assertTrue(isBundleInstalled(dp1.getBundle(getSymbolicName("bundle2"))));
dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
dpBuilder
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")))
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1")));
DeploymentPackage dp2 = installDeploymentPackage(dpBuilder);
assertNotNull("No deployment package returned?!", dp2);
awaitRefreshPackagesEvent();