* Tests that if an exception is thrown during the stop of a bundle, the installation/update continues and succeeds.
*/
@Test
public void testUpdateBundleWithExceptionThrownInStopCauseNoRollbackOk() throws Exception
{
DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
dpBuilder
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1")))
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3")));
DeploymentPackage dp = installDeploymentPackage(dpBuilder);
assertNotNull("No deployment package returned?!", dp);
awaitRefreshPackagesEvent();
assertBundleExists(getSymbolicName("bundle3"), "1.0.0");
System.setProperty("bundle3", "stop");
dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
dpBuilder
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1")))
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")))
.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3")));
dp = installDeploymentPackage(dpBuilder);
assertNotNull("No deployment package returned?!", dp);
assertBundleExists(getSymbolicName("bundle1"), "1.0.0");