Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2008-04-15 14:25:28 +0000
committerSimon Kaegi2008-04-15 14:25:28 +0000
commit4cac7c2500e742760ae3a788c29c9ad5d1755710 (patch)
tree2563badccec03e79050bb6b70a13f6ee392a6fcf /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation
parente0fa70dfe0cb05935b3d076d78a07b716fccc9d1 (diff)
downloadrt.equinox.p2-4cac7c2500e742760ae3a788c29c9ad5d1755710.tar.gz
rt.equinox.p2-4cac7c2500e742760ae3a788c29c9ad5d1755710.tar.xz
rt.equinox.p2-4cac7c2500e742760ae3a788c29c9ad5d1755710.zip
Bug 227131 extensionlocation test failures in 20080414
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.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java15
2 files changed, 8 insertions, 15 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 2d7d1f373..f6ddc69e0 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
@@ -164,7 +164,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
public void testNormalFeaturesandPluginsDirectory() throws IOException {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
- copy("1.0", getFile("/testdata/extensionlocation"), directory);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation"), directory);
IArtifactRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
@@ -180,7 +180,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
directory.mkdirs();
File features = new File(directory, "features");
features.mkdir();
- copy("1.0", getFile("/testdata/extensionlocation/features"), features);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation/features"), features);
IArtifactRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
@@ -196,7 +196,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
directory.mkdirs();
File plugins = new File(directory, "plugins");
plugins.mkdir();
- copy("1.0", getFile("/testdata/extensionlocation/plugins"), plugins);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation/plugins"), plugins);
IArtifactRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
@@ -211,7 +211,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "eclipse");
- copy("1.0", getFile("/testdata/extensionlocation"), eclipseDirectory);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory);
IArtifactRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
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 de32f33de..113bd4852 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,14 +14,12 @@ import java.io.File;
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.ExtensionLocationMetadataRepositoryFactory;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
import org.eclipse.equinox.internal.provisional.p2.query.Collector;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
-import org.eclipse.equinox.p2.tests.TestActivator;
public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProvisioningTest {
@@ -46,11 +44,6 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
factory = new ExtensionLocationMetadataRepositoryFactory();
}
- public static File getFile(String path) throws IOException {
- URL fileURL = TestActivator.getContext().getBundle().getEntry(path);
- return new File(FileLocator.toFileURL(fileURL).getPath());
- }
-
public void testNonFileURL() throws MalformedURLException {
URL nonFileURL = new URL("http://www.eclipse.org");
try {
@@ -165,7 +158,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
public void testNormalFeaturesandPluginsDirectory() throws IOException {
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
- copy("1.0", getFile("/testdata/extensionlocation"), directory);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation"), directory);
IMetadataRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
@@ -181,7 +174,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
directory.mkdirs();
File features = new File(directory, "features");
features.mkdir();
- copy("1.0", getFile("/testdata/extensionlocation/features"), features);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation/features"), features);
IMetadataRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
@@ -197,7 +190,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
directory.mkdirs();
File plugins = new File(directory, "plugins");
plugins.mkdir();
- copy("1.0", getFile("/testdata/extensionlocation/plugins"), plugins);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation/plugins"), plugins);
IMetadataRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);
@@ -212,7 +205,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv
File directory = new File(tempDirectory, "exists");
directory.mkdirs();
File eclipseDirectory = new File(directory, "eclipse");
- copy("1.0", getFile("/testdata/extensionlocation"), eclipseDirectory);
+ copy("1.0", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory);
IMetadataRepository repo = null;
try {
repo = factory.load(directory.toURL(), null);

Back to the top