Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-03-08 20:41:20 -0500
committerSusan Franklin2010-03-08 20:41:20 -0500
commitb6f54c6de86ecb2811d2d105dfeb3d22fc298b5a (patch)
tree6dbe2cffc1d2184a800815536589486ea83c9c9d /bundles/org.eclipse.equinox.p2.tests.ui
parent15cae78a65c657234d79fa501494ae91c86c4544 (diff)
downloadrt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.tar.gz
rt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.tar.xz
rt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.zip
Bug 229183 - [director] [api] ProvisioningContex does not handle repository in a consistent way
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.ui')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java8
2 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
index 0a8cdf778..168702de8 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
@@ -139,10 +139,12 @@ public abstract class AbstractProvisioningUITest extends AbstractProvisioningTes
req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, new Integer(IProfile.LOCK_UNINSTALL | IProfile.LOCK_UPDATE).toString());
}
// Use an empty provisioning context to prevent repo access
- IProvisioningPlan plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(req, new ProvisioningContext(new URI[] {}), getMonitor());
+ ProvisioningContext context = new ProvisioningContext(getAgent());
+ context.setMetadataRepositories(new URI[] {});
+ IProvisioningPlan plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(req, context, getMonitor());
if (plan.getStatus().getSeverity() == IStatus.ERROR || plan.getStatus().getSeverity() == IStatus.CANCEL)
return plan.getStatus();
- return getSession().performProvisioningPlan(plan, PhaseSetFactory.createDefaultPhaseSet(), new ProvisioningContext(), getMonitor());
+ return getSession().performProvisioningPlan(plan, PhaseSetFactory.createDefaultPhaseSet(), new ProvisioningContext(getAgent()), getMonitor());
}
protected IInstallableUnit createNamedIU(String id, String name, Version version, boolean isCategory) {
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
index efefd7c00..6394a9903 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
@@ -25,9 +25,9 @@ public class SizingTest extends AbstractProvisioningUITest {
IProfile testProfile = createProfile(profileId);
ProfileChangeRequest request = new ProfileChangeRequest(testProfile);
IProvisioningPlan plan = null;
- plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(request, new ProvisioningContext(), getMonitor());
+ plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(request, new ProvisioningContext(getAgent()), getMonitor());
long size = ProvUI.SIZE_NOTAPPLICABLE;
- size = ProvUI.getSize(getEngine(), plan, new ProvisioningContext(), getMonitor());
+ size = ProvUI.getSize(getEngine(), plan, new ProvisioningContext(getAgent()), getMonitor());
assertEquals("1.0", 0, size);
}
@@ -41,9 +41,9 @@ public class SizingTest extends AbstractProvisioningUITest {
ProfileChangeRequest request = new ProfileChangeRequest(testProfile);
request.add(f1);
IProvisioningPlan plan = null;
- plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(request, new ProvisioningContext(), getMonitor());
+ plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(request, new ProvisioningContext(getAgent()), getMonitor());
long size = ProvUI.SIZE_NOTAPPLICABLE;
- size = ProvUI.getSize(getEngine(), plan, new ProvisioningContext(), getMonitor());
+ size = ProvUI.getSize(getEngine(), plan, new ProvisioningContext(getAgent()), getMonitor());
assertEquals("1.0", 0, size);
}
}

Back to the top