Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2008-04-25 21:10:50 +0000
committerDJ Houghton2008-04-25 21:10:50 +0000
commita4608d99db890fb36fd32e7d396b38bc6ea63ddf (patch)
tree865cee6a5c9b5d373b3c4789c1da2b7a32726101 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation
parent9cf9c4b7caa6ee650327a8eae2e9a649c495af98 (diff)
downloadrt.equinox.p2-a4608d99db890fb36fd32e7d396b38bc6ea63ddf.tar.gz
rt.equinox.p2-a4608d99db890fb36fd32e7d396b38bc6ea63ddf.tar.xz
rt.equinox.p2-a4608d99db890fb36fd32e7d396b38bc6ea63ddf.zip
Bug 228523 - Multiple repositories on same location
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java173
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java171
2 files changed, 217 insertions, 127 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java
index f6ddc69e0..bce748dfe 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java
@@ -15,6 +15,7 @@ import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepository;
import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepositoryFactory;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
@@ -50,88 +51,103 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
return new File(FileLocator.toFileURL(fileURL).getPath());
}
- public void testNonFileURL() throws MalformedURLException {
- URL nonFileURL = new URL("http://www.eclipse.org");
+ public void testNonFileURL() {
try {
- factory.load(nonFileURL, null);
+ URL nonFileURL = new URL("http://www.eclipse.org");
+ factory.load(nonFileURL, getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
- fail();
}
- public void testNonExistentFile() throws MalformedURLException {
+ public void testNonExistentFile() {
File directory = new File(tempDirectory, "nonexistent");
delete(directory);
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
- fail();
}
- public void testNotDirectory() throws IOException {
+ public void testNotDirectory() {
File file = new File(tempDirectory, "exists.file");
- file.createNewFile();
try {
- factory.load(file.toURL(), null);
+ file.createNewFile();
+ factory.load(file.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
+ } catch (IOException e) {
+ fail("0.100", e);
}
- fail();
}
- public void testNoFeatureOrPluginsDirectory() throws MalformedURLException {
+ public void testNoFeatureOrPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
- fail();
}
- public void testEmptyFeatureAndPluginsDirectory() throws MalformedURLException {
+ public void testEmptyFeatureAndPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
new File(directory, "plugins").mkdir();
new File(directory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testEmptyFeaturesDirectory() throws MalformedURLException {
+ public void testEmptyFeaturesDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
new File(directory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testEmptyPluginsDirectory() throws MalformedURLException {
+ public void testEmptyPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
new File(directory, "plugins").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testEclipseBaseEmptyFeatureAndPluginsDirectory() throws MalformedURLException {
+ public void testEclipseBaseEmptyFeatureAndPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "eclipse");
@@ -139,13 +155,16 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
new File(eclipseDirectory, "plugins").mkdir();
new File(eclipseDirectory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testNotEclipseBaseEmptyFeatureAndPluginsDirectory() throws MalformedURLException {
+ public void testNotEclipseBaseEmptyFeatureAndPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "noteclipse");
@@ -153,72 +172,98 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
new File(eclipseDirectory, "plugins").mkdir();
new File(eclipseDirectory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.5", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
- fail();
}
- public void testNormalFeaturesandPluginsDirectory() throws IOException {
+ public void testNormalFeaturesandPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
copy("1.0", getTestData("1.1", "/testData/extensionlocation"), directory);
- IArtifactRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ URL location = directory.toURL();
+ IArtifactRepository repo = null;
+ try {
+ repo = factory.load(location, getMonitor());
+ fail("2.0");
+ } catch (ProvisionException ex) {
+ repo = factory.create(location, "testNormalFeaturesandPluginsDirectory", ExtensionLocationArtifactRepository.TYPE, null);
+ if (repo.getArtifactKeys().length != 2)
+ fail("2.1");
+ }
} catch (ProvisionException e) {
- fail();
+ fail("3.5");
+ } catch (MalformedURLException e) {
+ fail("3.99", e);
}
- if (repo.getArtifactKeys().length != 2)
- fail();
}
- public void testNormalFeaturesDirectory() throws IOException {
+ public void testNormalFeaturesDirectory() {
File directory = new File(tempDirectory, "exists/features");
directory.mkdirs();
File features = new File(directory, "features");
features.mkdir();
copy("1.0", getTestData("1.1", "/testData/extensionlocation/features"), features);
- IArtifactRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ URL location = directory.toURL();
+ IArtifactRepository repo = null;
+ try {
+ repo = factory.load(location, getMonitor());
+ fail("2.0");
+ } catch (ProvisionException ex) {
+ repo = factory.create(location, "testNormalFeaturesDirectory", ExtensionLocationArtifactRepository.TYPE, null);
+ if (repo.getArtifactKeys().length != 1)
+ fail("2.1");
+ }
} catch (ProvisionException e) {
- fail();
+ fail("3.5", e);
+ } catch (MalformedURLException e) {
+ fail("3.99", e);
}
- if (repo.getArtifactKeys().length != 1)
- fail();
}
- public void testNormalPluginsDirectory() throws IOException {
+ public void testNormalPluginsDirectory() {
File directory = new File(tempDirectory, "exists/plugins");
directory.mkdirs();
File plugins = new File(directory, "plugins");
plugins.mkdir();
copy("1.0", getTestData("1.1", "/testData/extensionlocation/plugins"), plugins);
- IArtifactRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ URL location = directory.toURL();
+ IArtifactRepository repo = null;
+ try {
+ repo = factory.load(location, getMonitor());
+ fail("2.0");
+ } catch (ProvisionException ex) {
+ repo = factory.create(location, "testNormalFeaturesDirectory", ExtensionLocationArtifactRepository.TYPE, null);
+ if (repo.getArtifactKeys().length != 1)
+ fail("2.1");
+ }
} catch (ProvisionException e) {
- fail();
+ fail("3.5", e);
+ } catch (MalformedURLException e) {
+ fail("3.99", e);
}
- if (repo.getArtifactKeys().length != 1)
- fail();
}
- public void testEclipseBaseNormalFeaturesandPluginsDirectory() throws IOException {
+ public void testEclipseBaseNormalFeaturesandPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "eclipse");
- copy("1.0", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory);
- IArtifactRepository repo = null;
+ copy("1.1", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory);
try {
- repo = factory.load(directory.toURL(), null);
+ IArtifactRepository repo = factory.load(directory.toURL(), getMonitor());
+ if (repo.getArtifactKeys().length != 2)
+ fail("1.0");
} catch (ProvisionException e) {
- fail();
+ fail("0.5", e);
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
- if (repo.getArtifactKeys().length != 2)
- fail();
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java
index 113bd4852..01d496bf1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java
@@ -14,6 +14,7 @@ import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
+import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepository;
import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepositoryFactory;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
@@ -44,88 +45,103 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
factory = new ExtensionLocationMetadataRepositoryFactory();
}
- public void testNonFileURL() throws MalformedURLException {
- URL nonFileURL = new URL("http://www.eclipse.org");
+ public void testNonFileURL() {
try {
- factory.load(nonFileURL, null);
+ URL nonFileURL = new URL("http://www.eclipse.org");
+ factory.load(nonFileURL, getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.2", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.3", e);
}
- fail();
}
- public void testNonExistentFile() throws MalformedURLException {
+ public void testNonExistentFile() {
File directory = new File(tempDirectory, "nonexistent");
delete(directory);
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.2", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.3", e);
}
- fail();
}
- public void testNotDirectory() throws IOException {
+ public void testNotDirectory() {
File file = new File(tempDirectory, "exists.file");
- file.createNewFile();
try {
- factory.load(file.toURL(), null);
+ file.createNewFile();
+ factory.load(file.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.2", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.3", e);
+ } catch (IOException e) {
+ fail("0.4", e);
}
- fail();
}
- public void testNoFeatureOrPluginsDirectory() throws MalformedURLException {
+ public void testNoFeatureOrPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.2", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.3", e);
}
- fail();
}
- public void testEmptyFeatureAndPluginsDirectory() throws MalformedURLException {
+ public void testEmptyFeatureAndPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
new File(directory, "plugins").mkdir();
new File(directory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ // expected
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testEmptyFeaturesDirectory() throws MalformedURLException {
+ public void testEmptyFeaturesDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
new File(directory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ // expected
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testEmptyPluginsDirectory() throws MalformedURLException {
+ public void testEmptyPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
new File(directory, "plugins").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ // expected
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testEclipseBaseEmptyFeatureAndPluginsDirectory() throws MalformedURLException {
+ public void testEclipseBaseEmptyFeatureAndPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "eclipse");
@@ -133,13 +149,16 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
new File(eclipseDirectory, "plugins").mkdir();
new File(eclipseDirectory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- fail();
+ // expected
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
}
- public void testNotEclipseBaseEmptyFeatureAndPluginsDirectory() throws MalformedURLException {
+ public void testNotEclipseBaseEmptyFeatureAndPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "noteclipse");
@@ -147,72 +166,98 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
new File(eclipseDirectory, "plugins").mkdir();
new File(eclipseDirectory, "features").mkdir();
try {
- factory.load(directory.toURL(), null);
+ factory.load(directory.toURL(), getMonitor());
+ fail("0.1");
} catch (ProvisionException e) {
- if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND)
- return;
+ assertEquals("0.2", ProvisionException.REPOSITORY_NOT_FOUND, e.getStatus().getCode());
+ } catch (MalformedURLException e) {
+ fail("0.99", e);
}
- fail();
}
- public void testNormalFeaturesandPluginsDirectory() throws IOException {
+ public void testNormalFeaturesandPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
copy("1.0", getTestData("1.1", "/testData/extensionlocation"), directory);
- IMetadataRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ URL location = directory.toURL();
+ IMetadataRepository repo = null;
+ try {
+ repo = factory.load(location, getMonitor());
+ fail("2.0");
+ } catch (ProvisionException ex) {
+ repo = factory.create(location, "testNormalFeaturesandPluginsDirectory", ExtensionLocationMetadataRepository.TYPE, null);
+ if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 3)
+ fail("2.99");
+ }
} catch (ProvisionException e) {
- fail();
+ fail("3.99");
+ } catch (MalformedURLException e) {
+ fail("4.99", e);
}
- if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 3)
- fail();
}
- public void testNormalFeaturesDirectory() throws IOException {
+ public void testNormalFeaturesDirectory() {
File directory = new File(tempDirectory, "exists/features");
directory.mkdirs();
File features = new File(directory, "features");
features.mkdir();
copy("1.0", getTestData("1.1", "/testData/extensionlocation/features"), features);
- IMetadataRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ URL location = directory.toURL();
+ IMetadataRepository repo = null;
+ try {
+ repo = factory.load(location, getMonitor());
+ fail("2.0");
+ } catch (ProvisionException ex) {
+ repo = factory.create(location, "testNormalFeaturesDirectory", ExtensionLocationMetadataRepository.TYPE, null);
+ if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 2)
+ fail("3.0");
+ }
} catch (ProvisionException e) {
- fail();
+ fail("4.0");
+ } catch (MalformedURLException e) {
+ fail("4.99", e);
}
- if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 2)
- fail();
}
- public void testNormalPluginsDirectory() throws IOException {
+ public void testNormalPluginsDirectory() {
File directory = new File(tempDirectory, "exists/plugins");
directory.mkdirs();
File plugins = new File(directory, "plugins");
plugins.mkdir();
copy("1.0", getTestData("1.1", "/testData/extensionlocation/plugins"), plugins);
- IMetadataRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ URL location = directory.toURL();
+ IMetadataRepository repo = null;
+ try {
+ repo = factory.load(location, getMonitor());
+ fail("2.0");
+ } catch (ProvisionException ex) {
+ repo = factory.create(location, "testNormalPluginsDirectory", ExtensionLocationMetadataRepository.TYPE, null);
+ if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 1)
+ fail("3.0");
+ }
} catch (ProvisionException e) {
- fail();
+ fail("4.0");
+ } catch (MalformedURLException e) {
+ fail("4.99", e);
}
- if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 1)
- fail();
}
- public void testEclipseBaseNormalFeaturesandPluginsDirectory() throws IOException {
+ public void testEclipseBaseNormalFeaturesandPluginsDirectory() {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "eclipse");
copy("1.0", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory);
- IMetadataRepository repo = null;
try {
- repo = factory.load(directory.toURL(), null);
+ IMetadataRepository repo = factory.load(directory.toURL(), getMonitor());
+ if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 3)
+ fail("3.0");
} catch (ProvisionException e) {
- fail();
+ fail("2.0");
+ } catch (MalformedURLException e) {
+ fail("2.99", e);
}
- if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 3)
- fail();
}
}

Back to the top