Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-05-13 03:08:50 +0000
committerPascal Rapicault2010-05-13 03:08:50 +0000
commit8e44259dd2e488e31f2bbe49f0de804813f01e9e (patch)
tree33721c0bad1fb0883ebd05130aeca9aad9207a4b
parent72da05f73573c322bd5e0370672e7719c7912ddb (diff)
downloadrt.equinox.p2-8e44259dd2e488e31f2bbe49f0de804813f01e9e.tar.gz
rt.equinox.p2-8e44259dd2e488e31f2bbe49f0de804813f01e9e.tar.xz
rt.equinox.p2-8e44259dd2e488e31f2bbe49f0de804813f01e9e.zip
add comment
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java1
2 files changed, 4 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java
index 0709805cc..0787e054c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java
@@ -31,14 +31,17 @@ public class Bug300572Small extends AbstractProvisioningTest {
protected void setUp() throws Exception {
super.setUp();
+ //A depends on B
a1 = createIU("A", Version.create("1.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.0.0, 1.0.0]"), null, false, true)});
b1 = createIU("B", Version.createOSGi(1, 0, 0), true);
b2 = createIU("B", Version.createOSGi(2, 0, 0), true);
b3 = createIU("B", Version.createOSGi(3, 0, 0), true);
+ //Patch 1 changes B
IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[2.0.0, 2.0.0]"), null, false, false, true));
p1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+ //Patch 2 changes B
IRequirementChange changeP2 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[3.0.0,3.0.0]"), null, false, false, true));
p2 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] {changeP2}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java
index edef9f71b..dcfac5f6e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java
@@ -22,6 +22,7 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
//This test verify that one patch can replace another one.
+//In this test we use the metadata from the original bug 300572 and simulate the optional addition of the patches
public class Bug300572Small3 extends AbstractProvisioningTest {
IInstallableUnit featureBeingPatched;
IInstallableUnitPatch p1, p2;

Back to the top