Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-03-09 01:41:20 +0000
committerSusan Franklin2010-03-09 01:41:20 +0000
commitb6f54c6de86ecb2811d2d105dfeb3d22fc298b5a (patch)
tree6dbe2cffc1d2184a800815536589486ea83c9c9d /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine
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/src/org/eclipse/equinox/p2/tests/engine')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java2
3 files changed, 15 insertions, 15 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java
index a36606e66..081090a22 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java
@@ -43,7 +43,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
* Tests invocation of DownloadManager when there is nothing to download.
*/
public void testEmptyWithContext() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
IStatus result = manager.start(null);
assertTrue("1.0", result.isOK());
@@ -53,7 +53,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
* Tests invocation of DownloadManager when there is nothing to download.
*/
public void testAddNullArtifactRequest() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
try {
manager.add((IArtifactRequest) null);
@@ -64,7 +64,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testAddNullArtifactRequestArray() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
try {
manager.add((IArtifactRequest[]) null);
@@ -75,7 +75,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testAddEmptyArtifactRequestArray() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
manager.add(new IArtifactRequest[0]);
IStatus result = manager.start(null);
@@ -83,7 +83,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testAddArtifactRequestArrayContainingNull() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
try {
IArtifactRequest[] requests = new IArtifactRequest[] {null};
@@ -95,7 +95,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testAddArtifactRequest() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
IArtifactRequest request = createArtifactRequest();
@@ -106,7 +106,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testContext() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
context.setArtifactRepositories(new URI[0]);
DownloadManager manager = createDownloadManager(context);
@@ -118,7 +118,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testAddArtifactRequestArray() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
DownloadManager manager = createDownloadManager(context);
IArtifactRequest[] requests = new IArtifactRequest[] {createArtifactRequest()};
@@ -146,7 +146,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testEmptyArtifactRepositoryListContext() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
context.setArtifactRepositories(new URI[0]);
DownloadManager manager = createDownloadManager(context);
@@ -157,7 +157,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testFileFirstArtifactRepositoryListContext() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
URI[] artifactRepos = new URI[2];
try {
artifactRepos[0] = new URI("file:/test");
@@ -176,7 +176,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testFileLastArtifactRepositoryListContext() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
URI[] artifactRepos = new URI[2];
try {
artifactRepos[0] = new URI("jar:file:/test!/");
@@ -195,7 +195,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
public void testNoFileArtifactRepositoryListContext() {
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
URI[] artifactRepos = new URI[2];
try {
artifactRepos[0] = new URI("jar:file:/test1!/");
@@ -214,6 +214,6 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
}
private DownloadManager createDownloadManager(ProvisioningContext context) {
- return new DownloadManager(context, getArtifactRepositoryManager());
+ return new DownloadManager(context, getAgent());
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
index 06aec32e3..84b93b833 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
@@ -165,7 +165,7 @@ public class EngineTest extends AbstractProvisioningTest {
IProfile profile = null;
try {
engine.perform(engine.createPlan(profile, null), new NullProgressMonitor());
- } catch (IllegalArgumentException expected) {
+ } catch (AssertionFailedException expected) {
return;
}
fail();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
index 1e5ef50be..c5b7b2a95 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
@@ -53,7 +53,7 @@ public class PhaseSetTest extends AbstractProvisioningTest {
InstallableUnitOperand op = new InstallableUnitOperand(createResolvedIU(createIU("iu")), null);
InstallableUnitOperand[] operands = new InstallableUnitOperand[] {op};
- ProvisioningContext context = new ProvisioningContext();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
IStatus result = phaseSet.perform(new EngineSession(null, profile, context), operands, new NullProgressMonitor());
assertTrue(result.isOK());
}

Back to the top