Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-04-10 20:31:07 -0400
committerPascal Rapicault2011-04-10 20:31:07 -0400
commit113a71498908d2e5dfc09042b5d891d9c6fd1930 (patch)
tree2a9cda82b406c551bb64aeb55bfd38e0f4526dfe
parentb10b5e7f19239d39ffd8a073d5e6e9548709b49a (diff)
downloadrt.equinox.p2-113a71498908d2e5dfc09042b5d891d9c6fd1930.tar.gz
rt.equinox.p2-113a71498908d2e5dfc09042b5d891d9c6fd1930.tar.xz
rt.equinox.p2-113a71498908d2e5dfc09042b5d891d9c6fd1930.zip
Add disabled test for composite metadata repository loading
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml128
3 files changed, 157 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
index 304c43891..2891dfe6d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
@@ -681,4 +681,20 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest {
}
}
+ // public void testFailingChildFailsCompleteRepository() {
+ // IMetadataRepositoryManager manager = getMetadataRepositoryManager();
+ // File repoFile = getTestData("Strict composite with missing child", "/testData/metadataRepo/compositeBadChildren");
+ // IMetadataRepository repo = null;
+ // boolean exception = false;
+ //
+ // try {
+ // repo = manager.loadRepository(repoFile.toURI(), null);
+ // } catch (ProvisionException e) {
+ // exception = true;
+ // }
+ // assertTrue("an exception should have been reported", exception);
+ // assertNull(repo);
+ //
+ // }
+
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml
new file mode 100644
index 000000000..6c8fd790c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeMetadataRepository version='1.0.0'?>
+<repository name='metadata name' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.compressed' value='false'/>
+ <property name='p2.timestamp' value='1234'/>
+ <property name='composite.restrictive.loading' value='true'/>
+ </properties>
+ <children size='2'>
+ <child location='one'/>
+ <child location='two'/>
+ </children>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml
new file mode 100644
index 000000000..41f172f48
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml
@@ -0,0 +1,128 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
+<repository name='Good Test Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1' description='Good test repository description'>
+ <properties size='3'>
+ <property name='p2.system' value='true'/>
+ <property name='p2.timestamp' value='1221680367875'/>
+ <property name='site.checksum' value='2404093275'/>
+ </properties>
+ <units size='5'>
+ <unit id='test.feature.feature.jar' version='1.0.0'>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='test.feature' version='1.0.0'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='test.feature' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ <licenses size='1'>
+ <license url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='test.bundle' version='1.0.0' singleton='false'>
+ <update id='test.bundle' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='test.bundle' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='test.fragment' version='1.0.0' singleton='false'>
+ <update id='test.fragment' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.fragment' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.fragment' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='test.fragment' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='test.feature.feature.group' version='1.0.0' singleton='false'>
+ <update id='test.feature.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.name' value='%featurename'/>
+ <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
+ <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ <property name='df_LT.featurename' value='j the feature'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
+ </provides>
+ <requires size='3'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.fragment' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' range='[1.0.0,1.0.0]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='Default' version='0.0.0'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
+ <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
+ <property name='org.eclipse.equinox.p2.type.category' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Default' version='0.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' range='[1.0.0,1.0.0]'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ </units>
+</repository>

Back to the top