Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2012-02-01 16:55:42 +0000
committerGlyn Normington2012-02-01 16:55:42 +0000
commit38e83705479e7bcbaa379227f7446e33a2d37a77 (patch)
tree324d055961a3d287e7d9c1402725bb59a469e7fe /org.eclipse.virgo.kernel.deployer.test/src/test
parentfcb5175eaae234059ec0a49d499159831322a010 (diff)
downloadorg.eclipse.virgo.kernel-38e83705479e7bcbaa379227f7446e33a2d37a77.tar.gz
org.eclipse.virgo.kernel-38e83705479e7bcbaa379227f7446e33a2d37a77.tar.xz
org.eclipse.virgo.kernel-38e83705479e7bcbaa379227f7446e33a2d37a77.zip
365034: add fix and further test - currently failing
Diffstat (limited to 'org.eclipse.virgo.kernel.deployer.test/src/test')
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithDAGTests.java26
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicD.plan11
2 files changed, 36 insertions, 1 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithDAGTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithDAGTests.java
index 8d093c8d..8134556f 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithDAGTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithDAGTests.java
@@ -167,7 +167,7 @@ public class PlanDeploymentWithDAGTests extends AbstractDeployerIntegrationTest
@Test
public void planReferencingAnAlreadyInstalledBundleNotInRepositoryUndeployBundleFirst() throws Exception {
- File file = new File("src/test/resources/plan-deployment/simple.bundle.three.jar");
+ File file = new File("src/test/resources/plan-deployment-dag/simple.bundle.three.jar");
DeploymentIdentity deploymentId = this.deployer.deploy(file.toURI());
assertBundlesInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
@@ -181,6 +181,30 @@ public class PlanDeploymentWithDAGTests extends AbstractDeployerIntegrationTest
this.deployer.undeploy(deploymentIdentity);
assertBundlesNotInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
}
+
+ @Test
+ public void twoPlansReferencingAnAlreadyInstalledBundleNotInRepository() throws Exception {
+
+ File file = new File("src/test/resources/plan-deployment-dag/simple.bundle.three.jar");
+ DeploymentIdentity bundleDeploymentId = this.deployer.deploy(file.toURI());
+ assertBundlesInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
+
+ DeploymentIdentity planCDeploymentId = this.deployer.deploy(new File("src/test/resources/testunscopednonatomicC.plan").toURI());
+ assertBundlesInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
+
+ DeploymentIdentity planDDeploymentId = this.deployer.deploy(new File("src/test/resources/testunscopednonatomicD.plan").toURI());
+ assertBundlesInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
+
+ this.deployer.undeploy(planCDeploymentId);
+ assertBundlesInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
+
+ this.deployer.undeploy(bundleDeploymentId.getType(), bundleDeploymentId.getSymbolicName(), bundleDeploymentId.getVersion());
+ assertBundlesInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
+
+ this.deployer.undeploy(planDDeploymentId);
+ assertBundlesNotInstalled(this.context.getBundles(), BUNDLE_THREE_SYMBOLIC_NAME);
+ }
+
static void assertBundlesActive(Bundle[] bundles, String... bsns) {
for (String bsn : bsns) {
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicD.plan b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicD.plan
new file mode 100644
index 00000000..6cf0f4e7
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicD.plan
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plan name="testD.plan" version="1.0.0" scoped="false" atomic="false"
+ xmlns="http://www.eclipse.org/virgo/schema/plan"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.eclipse.org/virgo/schema/plan
+ http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">
+
+ <artifact type="bundle" name="simple.bundle.three" version="[1, 2)"/>
+
+</plan> \ No newline at end of file

Back to the top