diff options
author | Alexander Kurtakov | 2017-08-23 09:59:42 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-08-23 10:03:16 +0000 |
commit | 8db0333eaa018182202cf457c55bc99dc855697f (patch) | |
tree | 409c018d0bdc0e671f752eceb51441320905f75c /bundles/org.eclipse.equinox.p2.tests | |
parent | e2e76129b65add425d644edf93d149cc636e9376 (diff) | |
download | rt.equinox.p2-8db0333eaa018182202cf457c55bc99dc855697f.tar.gz rt.equinox.p2-8db0333eaa018182202cf457c55bc99dc855697f.tar.xz rt.equinox.p2-8db0333eaa018182202cf457c55bc99dc855697f.zip |
Bug 521301 - Stop using deprecated p2 methods in p2 tests
Change-Id: I08b47ba0d4219f15b061b759c01f874747a496df
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests')
28 files changed, 143 insertions, 125 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java index ce0d424c3..19f8ce65c 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ReducedCUDFParser.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2009, 2015 IBM Corporation and others. All rights reserved. + * Copyright (c) 2009, 2017 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation and ideas + * + * Contributors: + * IBM Corporation - initial implementation and ideas * Sonatype Inc. - trim down for annotation work ******************************************************************************/ @@ -355,8 +355,8 @@ public class ReducedCUDFParser { * Set the given list of requirements on teh current IU. Merge if necessary. */ private void mergeRequirements(List requirements) { - if (currentIU.getRequiredCapabilities() != null) { - List<IRequirement> current = currentIU.getRequiredCapabilities(); + if (currentIU.getRequirements() != null) { + List<IRequirement> current = currentIU.getRequirements(); for (IRequirement iRequirement : current) { requirements.add(iRequirement); } @@ -367,7 +367,7 @@ public class ReducedCUDFParser { /* * Returns a map where the key is the package name and the value is a Tuple. * If there is more than one entry for a particular package, the extra entries are included - * in the extraData field of the Tuple. + * in the extraData field of the Tuple. */ private List createPackageList(String line) { StringTokenizer tokenizer = new StringTokenizer(line, ","); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java index f9c87bbb0..b78696f45 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java @@ -817,7 +817,7 @@ public class MirrorTaskTest extends AbstractAntProvisioningTest { */ protected IArtifactRepository createRepositoryWithIU(URI repoLocation, IArtifactDescriptor descriptor) throws ProvisionException { IArtifactRepository artifactRepository = getArtifactRepositoryManager().createRepository(repoLocation, "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - artifactRepository.addDescriptor(descriptor); + artifactRepository.addDescriptor(descriptor, new NullProgressMonitor()); IMetadataRepository metaRepo = getMetadataRepositoryManager().createRepository(repoLocation, "Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); InstallableUnit iu = new InstallableUnit(); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java index 6df6320f7..7cc278060 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java @@ -52,8 +52,8 @@ public class ArtifactRepositoryWithReferenceDescriptors extends AbstractProvisio descriptor2.setRepositoryProperty("file.name", fileLocation.getAbsolutePath()); descriptor2.setRepositoryProperty("file.lastModified", Long.toString(fileLocation.lastModified())); - repo.addDescriptor(descriptor1); - repo.addDescriptor(descriptor2); + repo.addDescriptor(descriptor1, new NullProgressMonitor()); + repo.addDescriptor(descriptor2, new NullProgressMonitor()); } public void testOldStyleReference() { diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java index 18f12331d..2c47261d8 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/BatchExecuteArtifactRepositoryTest.java @@ -48,7 +48,7 @@ public class BatchExecuteArtifactRepositoryTest extends AbstractProvisioningTest final SimpleArtifactRepository repo = (SimpleArtifactRepository) getArtifactRepositoryManager().createRepository(repositoryURI, "My Repo", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties); final URI artifactXML = new URI(repositoryFile.toURI().toString() + "/artifacts.xml"); IStatus status = repo.executeBatch(monitor -> { - repo.addDescriptor(createDescriptor("foo", "foo", Version.emptyVersion)); + repo.addDescriptor(createDescriptor("foo", "foo", Version.emptyVersion), monitor); try { assertFalse("1.0", fileContainsString(artifactXML, "foo")); } catch (IOException e) { @@ -74,9 +74,9 @@ public class BatchExecuteArtifactRepositoryTest extends AbstractProvisioningTest final SimpleArtifactRepository repo = (SimpleArtifactRepository) getArtifactRepositoryManager().createRepository(repositoryURI, "My Repo", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties); final URI artifactXML = new URI(repositoryFile.toURI().toString() + "/artifacts.xml"); IStatus status = repo.executeBatch(monitor -> { - repo.addDescriptor(createDescriptor("foo", "foo", Version.emptyVersion)); - repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion)); - repo.addDescriptor(createDescriptor("baz", "baz", Version.emptyVersion)); + repo.addDescriptor(createDescriptor("foo", "foo", Version.emptyVersion), monitor); + repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion), monitor); + repo.addDescriptor(createDescriptor("baz", "baz", Version.emptyVersion), monitor); try { assertFalse("1.0", fileContainsString(artifactXML, "foo")); assertFalse("1.0", fileContainsString(artifactXML, "bar")); @@ -108,8 +108,8 @@ public class BatchExecuteArtifactRepositoryTest extends AbstractProvisioningTest final SimpleArtifactRepository repo = (SimpleArtifactRepository) getArtifactRepositoryManager().createRepository(repositoryURI, "My Repo", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties); final URI artifactXML = new URI(repositoryFile.toURI().toString() + "/artifacts.xml"); IStatus status = repo.executeBatch(monitor -> { - repo.addDescriptor(createDescriptor("foo", "foo", Version.emptyVersion)); - repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion)); + repo.addDescriptor(createDescriptor("foo", "foo", Version.emptyVersion), monitor); + repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion), monitor); throw new RuntimeException(); }, new NullProgressMonitor()); assertFalse(status.isOK()); @@ -134,9 +134,9 @@ public class BatchExecuteArtifactRepositoryTest extends AbstractProvisioningTest final URI artifactXML = new URI(repositoryFile.toURI().toString() + "/artifacts.xml"); IStatus status = repo.executeBatch(monitor -> { IArtifactDescriptor foo = createDescriptor("foo", "foo", Version.emptyVersion); - repo.addDescriptor(foo); - repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion)); - repo.removeDescriptor(foo); + repo.addDescriptor(foo, monitor); + repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion), monitor); + repo.removeDescriptor(foo, monitor); }, new NullProgressMonitor()); assertTrue(status.isOK()); assertEquals("1.0", 1, repo.query(new ArtifactKeyQuery("bar", "bar", null), new NullProgressMonitor()).toSet().size()); @@ -159,13 +159,13 @@ public class BatchExecuteArtifactRepositoryTest extends AbstractProvisioningTest final SimpleArtifactRepository repo = (SimpleArtifactRepository) getArtifactRepositoryManager().createRepository(repositoryURI, "My Repo", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties); final URI artifactXML = new URI(repositoryFile.toURI().toString() + "/artifacts.xml"); IStatus status = repo.executeBatch(monitor -> { - repo.addDescriptor(createDescriptor("1", "1", Version.emptyVersion)); - repo.addDescriptor(createDescriptor("2", "2", Version.emptyVersion)); - repo.addDescriptor(createDescriptor("3", "3", Version.emptyVersion)); + repo.addDescriptor(createDescriptor("1", "1", Version.emptyVersion), monitor); + repo.addDescriptor(createDescriptor("2", "2", Version.emptyVersion), monitor); + repo.addDescriptor(createDescriptor("3", "3", Version.emptyVersion), monitor); IArtifactDescriptor foo = createDescriptor("foo", "foo", Version.emptyVersion); - repo.addDescriptor(foo); - repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion)); - repo.removeDescriptor(foo); + repo.addDescriptor(foo, monitor); + repo.addDescriptor(createDescriptor("bar", "bar", Version.emptyVersion), monitor); + repo.removeDescriptor(foo, monitor); }, new NullProgressMonitor()); assertTrue(status.isOK()); assertEquals("1.0", 4, repo.query(new ArtifactKeyQuery(null, null, null), new NullProgressMonitor()).toSet().size()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java index 0d8f0c657..14de73715 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java @@ -114,7 +114,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, null); try { - compRepo.addDescriptor(descriptor); + compRepo.addDescriptor(descriptor, new NullProgressMonitor()); fail("Should not be able to add Artifact Descriptor"); } catch (UnsupportedOperationException e) { //expected. fall through @@ -134,7 +134,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { descriptors[0] = descriptor; try { - compRepo.addDescriptors(descriptors); + compRepo.addDescriptors(descriptors, new NullProgressMonitor()); fail("Should not be able to add Artifact Descriptors using an array"); } catch (UnsupportedOperationException e) { //expected. fall through @@ -150,7 +150,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, null); try { - compRepo.removeDescriptor(descriptor); + compRepo.removeDescriptor(descriptor, new NullProgressMonitor()); fail("Should not be able to remove Artifact Descriptor using a Artifact Descriptor"); } catch (UnsupportedOperationException e) { //expected. fall through @@ -165,7 +165,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactKey key = PublisherHelper.createBinaryArtifactKey("testKeyId", Version.create("1.2.3")); try { - compRepo.removeDescriptor(key); + compRepo.removeDescriptor(key, new NullProgressMonitor()); fail("Should not be able to remove Artifact Descriptor using an Artifact Key"); } catch (UnsupportedOperationException e) { //expected. fall through @@ -177,7 +177,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { CompositeArtifactRepository compRepo = createRepo(false); try { - compRepo.removeAll(); + compRepo.removeAll(new NullProgressMonitor()); fail("Should not be able to Remove All"); } catch (UnsupportedOperationException e) { //expected. fall through @@ -713,9 +713,9 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { CompositeArtifactRepository compRepo = null; try { repo1 = getArtifactRepositoryManager().createRepository(repo1Location.toURI(), "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo1.addDescriptor(descriptor1); + repo1.addDescriptor(descriptor1, new NullProgressMonitor()); repo2 = getArtifactRepositoryManager().createRepository(repo2Location.toURI(), "Repo 2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo2.addDescriptor(descriptor2); + repo2.addDescriptor(descriptor2, new NullProgressMonitor()); compRepo = (CompositeArtifactRepository) getArtifactRepositoryManager().createRepository(compRepoLocation.toURI(), "Composite Repo", IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null); getArtifactRepositoryManager().removeRepository(repo1Location.toURI()); getArtifactRepositoryManager().removeRepository(repo2Location.toURI()); @@ -752,9 +752,9 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { CompositeArtifactRepository compRepo = null; try { repo1 = getArtifactRepositoryManager().createRepository(repo1Location.toURI(), "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo1.addDescriptor(descriptor1); + repo1.addDescriptor(descriptor1, new NullProgressMonitor()); repo2 = getArtifactRepositoryManager().createRepository(repo2Location.toURI(), "Repo 2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo2.addDescriptor(descriptor2); + repo2.addDescriptor(descriptor2, new NullProgressMonitor()); getArtifactRepositoryManager().removeRepository(repo1Location.toURI()); getArtifactRepositoryManager().removeRepository(repo2Location.toURI()); compRepo = (CompositeArtifactRepository) getArtifactRepositoryManager().createRepository(compRepoLocation.toURI(), "Composite Repo", IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null); @@ -1100,20 +1100,20 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { BadSite dest = null; CompositeArtifactRepository source = null; File destination = new File(getTempFolder(), getUniqueString()); - try (OutputStream out = new FileOutputStream(destination);) { + try (OutputStream out = new FileOutputStream(destination)) { source = createRepository(new URI("memory:/in/memory"), "in memory test"); IArtifactDescriptor descriptor = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "missingSize.asdf", Version.create("1.5.1.v200803061910"))); // Create 'bad' child which returns an error in transfer childOne = new BadSite(new URI("memory:/in/memory/one")); - childOne.addDescriptor(descriptor); + childOne.addDescriptor(descriptor, new NullProgressMonitor()); childOne.addToRepositoryManager(); source.addChild(childOne.getLocation()); // Create 'good' child which downloads successfully TestArtifactRepository childTwo = new TestArtifactRepository(getAgent(), new URI("memory:/in/memory/two")); - childTwo.addDescriptor(descriptor); + childTwo.addDescriptor(descriptor, new NullProgressMonitor()); childTwo.addArtifact(descriptor.getArtifactKey(), contents); childTwo.addToRepositoryManager(); source.addChild(childTwo.getLocation()); @@ -1269,7 +1269,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactDescriptor desc = new ArtifactDescriptor(key); childOne = createChild(); - childOne.addDescriptor(desc); + childOne.addDescriptor(desc, new NullProgressMonitor()); ((TestArtifactRepository) childOne).addArtifact(key, new byte[] {}); source.addChild(childOne.getLocation()); @@ -1278,7 +1278,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { assertFalse("Composite repo contains descriptor but child is marked bad", Arrays.asList(source.getArtifactDescriptors(key)).contains(desc)); childTwo = createChild(); - childOne.addDescriptor(desc); + childOne.addDescriptor(desc, new NullProgressMonitor()); ((TestArtifactRepository) childTwo).addArtifact(key, new byte[] {}); source.addChild(childTwo.getLocation()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/FoldersRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/FoldersRepositoryTest.java index cc030807f..7a288e304 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/FoldersRepositoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/FoldersRepositoryTest.java @@ -16,7 +16,7 @@ import java.io.FileFilter; import java.net.URL; import java.util.Iterator; import junit.framework.TestCase; -import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.*; import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; import org.eclipse.equinox.internal.p2.metadata.ArtifactKey; import org.eclipse.equinox.p2.core.IProvisioningAgent; @@ -72,6 +72,7 @@ public class FoldersRepositoryTest extends TestCase { FileFilter filter = pathname -> !pathname.getName().equals("CVS"); File[] fileList = pluginsFolder.listFiles(filter); assertEquals(2, fileList.length); + IProgressMonitor monitor = new NullProgressMonitor(); for (int i = 0; i < fileList.length; i++) { File file = fileList[i]; String fileName = file.getName(); @@ -85,13 +86,13 @@ public class FoldersRepositoryTest extends TestCase { if (file.isDirectory()) descriptor.setProperty("artifact.folder", "true"); - repo.addDescriptor(descriptor); + repo.addDescriptor(descriptor, monitor); } IQueryResult keys = repo.query(ArtifactKeyQuery.ALL_KEYS, null); assertEquals(2, AbstractProvisioningTest.queryResultSize(keys)); for (Iterator iterator = keys.iterator(); iterator.hasNext();) { IArtifactKey key = (IArtifactKey) iterator.next(); - repo.removeDescriptor(key); + repo.removeDescriptor(key, monitor); } keys = repo.query(ArtifactKeyQuery.ALL_KEYS, null); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest.java index 6f7b52424..3da9f866f 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest.java @@ -148,7 +148,7 @@ public class MirrorRequestTest extends AbstractProvisioningTest { assertEquals("Expected WARNING status", IStatus.WARNING, req.getResult().getSeverity()); // Remove key from repo so the same one can be used - targetRepository.removeDescriptor(key); + targetRepository.removeDescriptor(key, new NullProgressMonitor()); // Set Status sequence req = new MirrorRequest(key, targetRepository, null, null, getTransport()); @@ -159,7 +159,7 @@ public class MirrorRequestTest extends AbstractProvisioningTest { assertEquals("Expected INFO status", IStatus.INFO, req.getResult().getSeverity()); // Remove key from repo so the same one can be used - targetRepository.removeDescriptor(key); + targetRepository.removeDescriptor(key, new NullProgressMonitor()); // Set Status sequence req = new MirrorRequest(key, targetRepository, null, null, getTransport()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java index 231239c88..2a47d7054 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java @@ -87,7 +87,7 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactKey key = PublisherHelper.createBinaryArtifactKey("testKeyId", Version.create("1.2.3")); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, null); - repo.addDescriptor(descriptor); + repo.addDescriptor(descriptor, new NullProgressMonitor()); File files[] = repositoryFile.listFiles(); boolean jarFilePresent = false; @@ -120,7 +120,7 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactKey key = PublisherHelper.createBinaryArtifactKey("testKeyId", Version.create("1.2.3")); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, null); - repo.addDescriptor(descriptor); + repo.addDescriptor(descriptor, new NullProgressMonitor()); File files[] = repositoryFile.listFiles(); boolean jarFilePresent = false; @@ -377,9 +377,10 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactRepository repo = getArtifactRepositoryManager().createRepository(repositoryURI, "test", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, new HashMap()); long start = System.currentTimeMillis(); + IProgressMonitor monitor = new NullProgressMonitor(); for (int i = 0; i < 10000; i++) { ArtifactDescriptor d = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a" + i, Version.create("1.0.0"))); - repo.addDescriptor(d); + repo.addDescriptor(d, monitor); } long end = System.currentTimeMillis(); System.out.println("Total time: " + (end - start)); @@ -395,7 +396,7 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest { repo.executeBatch(monitor -> { for (int i = 0; i < 10000; i++) { ArtifactDescriptor d = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a" + i, Version.create("1.0.0"))); - repo.addDescriptor(d); + repo.addDescriptor(d, monitor); } }, new NullProgressMonitor()); @@ -413,10 +414,10 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest { ArtifactDescriptor d2 = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a", Version.create("2.0.0"))); ArtifactDescriptor d3 = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a", Version.create("2.0.0"))); d3.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED); - - repo.addDescriptor(d1); - repo.addDescriptor(d2); - repo.addDescriptor(d3); + IProgressMonitor monitor = new NullProgressMonitor(); + repo.addDescriptor(d1, monitor); + repo.addDescriptor(d2, monitor); + repo.addDescriptor(d3, monitor); IQueryable<IArtifactDescriptor> descQueryable = repo.descriptorQueryable(); IQueryResult<IArtifactDescriptor> result = descQueryable.query(new ArtifactDescriptorQuery("a", null, null), null); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java index e5dce250d..f350ec9b0 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -13,6 +13,8 @@ package org.eclipse.equinox.p2.tests.gc; import java.io.File; import java.net.URI; import java.util.HashMap; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.garbagecollector.CoreGarbageCollector; import org.eclipse.equinox.internal.p2.metadata.ArtifactKey; import org.eclipse.equinox.p2.core.ProvisionException; @@ -35,10 +37,10 @@ public class GCCleanTest extends AbstractProvisioningTest { ArtifactDescriptor d2 = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a", Version.create("2.0.0"))); ArtifactDescriptor d3 = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a", Version.create("2.0.0"))); d3.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED); - - repo.addDescriptor(d1); - repo.addDescriptor(d2); - repo.addDescriptor(d3); + IProgressMonitor monitor = new NullProgressMonitor(); + repo.addDescriptor(d1, monitor); + repo.addDescriptor(d2, monitor); + repo.addDescriptor(d3, monitor); return repo; } diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java index fb3520ea9..a8c379c45 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java @@ -1078,9 +1078,9 @@ public class ArtifactMirrorApplicationTest extends AbstractProvisioningTest { IArtifactRepository repo2 = null; try { repo1 = getArtifactRepositoryManager().createRepository(repo1Location.toURI(), "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo1.addDescriptor(descriptor1); + repo1.addDescriptor(descriptor1, new NullProgressMonitor()); repo2 = getArtifactRepositoryManager().createRepository(repo2Location.toURI(), "Repo 2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo2.addDescriptor(descriptor2); + repo2.addDescriptor(descriptor2, new NullProgressMonitor()); } catch (ProvisionException e) { fail("Error creating repositories", e); } @@ -1130,9 +1130,9 @@ public class ArtifactMirrorApplicationTest extends AbstractProvisioningTest { IArtifactRepository baseline = null; try { repo = getArtifactRepositoryManager().createRepository(repoLocation.toURI(), "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo.addDescriptor(descriptor1); + repo.addDescriptor(descriptor1, new NullProgressMonitor()); baseline = getArtifactRepositoryManager().createRepository(baselineLocation.toURI(), "Repo 2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - baseline.addDescriptor(descriptor2); + baseline.addDescriptor(descriptor2, new NullProgressMonitor()); } catch (ProvisionException e) { fail("Error creating repositories", e); } diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java index 46a4d6399..0188649f5 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java @@ -1161,9 +1161,9 @@ public class NewMirrorApplicationArtifactTest extends AbstractProvisioningTest { IArtifactRepository repo2 = null; try { repo1 = getArtifactRepositoryManager().createRepository(repo1Location.toURI(), "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo1.addDescriptor(descriptor1); + repo1.addDescriptor(descriptor1, new NullProgressMonitor()); repo2 = getArtifactRepositoryManager().createRepository(repo2Location.toURI(), "Repo 2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo2.addDescriptor(descriptor2); + repo2.addDescriptor(descriptor2, new NullProgressMonitor()); } catch (ProvisionException e) { fail("Error creating repositories", e); } @@ -1226,9 +1226,9 @@ public class NewMirrorApplicationArtifactTest extends AbstractProvisioningTest { IArtifactRepository baseline = null; try { repo = getArtifactRepositoryManager().createRepository(repoLocation.toURI(), "Repo 1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - repo.addDescriptor(descriptor1); + repo.addDescriptor(descriptor1, new NullProgressMonitor()); baseline = getArtifactRepositoryManager().createRepository(baselineLocation.toURI(), "Repo 2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null); - baseline.addDescriptor(descriptor2); + baseline.addDescriptor(descriptor2, new NullProgressMonitor()); } catch (ProvisionException e) { fail("Error creating repositories", e); } diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java index 1a3d69059..1c6913103 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java @@ -337,7 +337,7 @@ public class BundlesActionTest extends ActionTest { public void cleanup() { super.cleanup(); if (artifactRepository != null) { - artifactRepository.removeAll(); + artifactRepository.removeAll(new NullProgressMonitor()); artifactRepository = null; } } diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java index 190b70a1c..cea0a2c72 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java @@ -133,7 +133,7 @@ public class RootFilesActionTest extends ActionTest { super.cleanup(); if (artifactRepository != null) - artifactRepository.removeAll(); + artifactRepository.removeAll(new NullProgressMonitor()); artifactRepository = null; excludedFiles = null; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java index c3974abeb..bd8d4ba60 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -12,6 +12,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util; @@ -82,7 +83,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -135,7 +136,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -194,7 +195,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -247,7 +248,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java index 4160b0e06..3ec2123f3 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -14,6 +14,7 @@ import java.io.File; import java.io.IOException; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*; @@ -57,7 +58,7 @@ public class AddSourceBundleActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java index de6dc7fa4..8661a7876 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -12,6 +12,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.engine.phases.CheckTrust; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; @@ -56,7 +57,7 @@ public class CheckTrustActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java index 1f4479bd9..b370d9a31 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation * Cloudsmith Inc - ongoing development @@ -14,6 +14,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.util.*; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util; @@ -122,7 +123,7 @@ public class ChmodActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, dirBundleTarget); IInstallableUnit iu = createBundleIU(bundleDescription, dirBundleTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -200,7 +201,7 @@ public class ChmodActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, dirBundleTarget); IInstallableUnit iu = createBundleIU(bundleDescription, dirBundleTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java index 7214d4760..0aa51a7e1 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java @@ -132,7 +132,7 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest { BundleDescription bundleDescription = BundlesAction.createBundleDescription(osgiTarget); IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map<String, String> extraProperties = new HashMap<>(); extraProperties.put(IInstallableUnit.PROP_PARTIAL_IU, Boolean.TRUE.toString()); @@ -170,7 +170,7 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest { BundleDescription bundleDescription = BundlesAction.createBundleDescription(osgiTarget); IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map<String, String> extraProperties = new HashMap<>(); extraProperties.put(IInstallableUnit.PROP_PARTIAL_IU, Boolean.TRUE.toString()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java index e47341493..3b70c4c7f 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; @@ -58,7 +59,7 @@ public class InstallBundleActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java index 62b3eb0de..912804f25 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java @@ -1,9 +1,9 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This + * Copyright (c) 2008, 2017 IBM Corporation and others. All rights reserved. This * program and the accompanying materials are made available under the terms of * the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; @@ -12,6 +12,7 @@ import java.io.File; import java.net.URI; import java.util.*; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser; @@ -63,7 +64,7 @@ public class InstallFeatureActionTest extends AbstractProvisioningTest { ((SimpleArtifactDescriptor) descriptor).setRepositoryProperty("artifact.folder", Boolean.TRUE.toString()); IInstallableUnit iu = FeaturesAction.createFeatureJarIU(feature, info); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -116,7 +117,7 @@ public class InstallFeatureActionTest extends AbstractProvisioningTest { ((SimpleArtifactDescriptor) descriptor).setRepositoryProperty("artifact.folder", Boolean.TRUE.toString()); IInstallableUnit iu = FeaturesAction.createFeatureJarIU(feature, info); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java index c2153841a..4a4213ac1 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -12,6 +12,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util; @@ -86,7 +87,7 @@ public class LinkActionTest extends AbstractProvisioningTest { ArtifactDescriptor descriptor = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(key, dirBundleTarget); descriptor.setProperty("artifact.folder", Boolean.TRUE.toString()); IInstallableUnit iu = createBundleIU(bundleDescription, dirBundleTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -131,7 +132,7 @@ public class LinkActionTest extends AbstractProvisioningTest { ArtifactDescriptor descriptor = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(key, dirBundleTarget); descriptor.setProperty("artifact.folder", Boolean.TRUE.toString()); IInstallableUnit iu = createBundleIU(bundleDescription, dirBundleTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java index 245612353..b57014a6e 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; @@ -58,7 +59,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -104,7 +105,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -126,7 +127,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest { assertTrue(isMarkedStarted(manipulator, osgiTarget, false)); // let's remove the artifact now - bundlePool.removeDescriptor(descriptor); + bundlePool.removeDescriptor(descriptor, new NullProgressMonitor()); MarkStartedAction action = new MarkStartedAction(); action.execute(parameters); @@ -153,7 +154,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java index 0187a7e1d..373017306 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -12,6 +12,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util; @@ -84,7 +85,7 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -140,7 +141,7 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java index d86b3d742..7dfe5fadc 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -14,6 +14,7 @@ import java.io.File; import java.io.IOException; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*; @@ -57,7 +58,7 @@ public class RemoveSourceBundleActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java index b9f1bfea4..a7d7286b0 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -12,6 +12,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util; @@ -84,7 +85,7 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -141,7 +142,7 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java index 7de00e543..6559810d7 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; @@ -58,7 +59,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -104,7 +105,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); @@ -126,7 +127,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest { assertTrue(isStartLevel(manipulator, osgiTarget, -1)); // let's remove the artifact now - bundlePool.removeDescriptor(descriptor); + bundlePool.removeDescriptor(descriptor, new NullProgressMonitor()); SetStartLevelAction action = new SetStartLevelAction(); action.execute(parameters); @@ -153,7 +154,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java index ad84ace14..e72578c4d 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint; @@ -58,7 +59,7 @@ public class UninstallBundleActionTest extends AbstractProvisioningTest { IArtifactKey key = BundlesAction.createBundleArtifactKey(bundleDescription.getSymbolicName(), bundleDescription.getVersion().toString()); IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, osgiTarget); IInstallableUnit iu = createBundleIU(bundleDescription, osgiTarget.isDirectory(), key); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java index 4df2e68cc..07dc97da1 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java @@ -1,9 +1,9 @@ /******************************************************************************* - * Copyright (c) 2008, 2015 IBM Corporation and others. All rights reserved. This + * Copyright (c) 2008, 2017 IBM Corporation and others. All rights reserved. This * program and the accompanying materials are made available under the terms of * the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; @@ -11,6 +11,7 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse; import java.io.File; import java.net.URI; import java.util.*; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor; import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand; import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser; @@ -67,7 +68,7 @@ public class UninstallFeatureActionTest extends AbstractProvisioningTest { ((SimpleArtifactDescriptor) descriptor).setRepositoryProperty("artifact.folder", Boolean.TRUE.toString()); IInstallableUnit iu = FeaturesAction.createFeatureJarIU(feature, info); - bundlePool.addDescriptor(descriptor); + bundlePool.addDescriptor(descriptor, new NullProgressMonitor()); Map parameters = new HashMap(); parameters.put(ActionConstants.PARM_AGENT, getAgent()); |