Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 162460 Details for
Bug 306424
[reconciler] Optionally installed IU not removed when dependent IU is removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
3.6 test case
306424.txt (text/plain), 8.93 KB, created by
DJ Houghton
on 2010-03-18 15:31:55 EDT
(
hide
)
Description:
3.6 test case
Filename:
MIME Type:
Creator:
DJ Houghton
Created:
2010-03-18 15:31:55 EDT
Size:
8.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.tests >Index: src/org/eclipse/equinox/p2/tests/planner/Bug306424.java >=================================================================== >RCS file: src/org/eclipse/equinox/p2/tests/planner/Bug306424.java >diff -N src/org/eclipse/equinox/p2/tests/planner/Bug306424.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/equinox/p2/tests/planner/Bug306424.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,84 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 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.planner; >+ >+import java.io.File; >+import java.lang.reflect.Field; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry; >+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest; >+import org.eclipse.equinox.p2.engine.*; >+import org.eclipse.equinox.p2.metadata.IInstallableUnit; >+import org.eclipse.equinox.p2.metadata.Version; >+import org.eclipse.equinox.p2.planner.IPlanner; >+import org.eclipse.equinox.p2.planner.IProfileChangeRequest; >+import org.eclipse.equinox.p2.query.*; >+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest; >+ >+public class Bug306424 extends AbstractProvisioningTest { >+ >+ private File previousStoreValue = null; >+ private IProfile profile; >+ >+ protected String getTestDataPath() { >+ return "testData/bug306424"; >+ } >+ >+ protected void tearDown() throws Exception { >+ SimpleProfileRegistry realProfileRegistry = (SimpleProfileRegistry) getProfileRegistry(); >+ >+ Field profilesMapField = SimpleProfileRegistry.class.getDeclaredField("profiles"); //$NON-NLS-1$ >+ profilesMapField.setAccessible(true); >+ profilesMapField.set(realProfileRegistry, null); >+ >+ Field profileStore = SimpleProfileRegistry.class.getDeclaredField("store"); >+ profileStore.setAccessible(true); >+ profileStore.set(realProfileRegistry, previousStoreValue); >+ super.tearDown(); >+ } >+ >+ /* >+ * /* (non-Javadoc) >+ * @see org.eclipse.equinox.p2.tests.AbstractProvisioningTest#setUp() >+ */ >+ protected void setUp() throws Exception { >+ super.setUp(); >+ File reporegistry1 = getTestData("loading planner test data", getTestDataPath()); >+ File tempFolder = getTempFolder(); >+ copy("0.2", reporegistry1, tempFolder); >+ IProfileRegistry realProfileRegistry = getProfileRegistry(); >+ //Tweak the running profile registry >+ Field profileStore = SimpleProfileRegistry.class.getDeclaredField("store"); >+ profileStore.setAccessible(true); >+ previousStoreValue = (File) profileStore.get(realProfileRegistry); >+ profileStore.set(realProfileRegistry, new File(tempFolder, "p2/org.eclipse.equinox.p2.engine/profileRegistry")); >+ >+ Field profilesMapField = SimpleProfileRegistry.class.getDeclaredField("profiles"); //$NON-NLS-1$ >+ profilesMapField.setAccessible(true); >+ profilesMapField.set(realProfileRegistry, null); >+ //End of tweaking the profile registry >+ >+ profile = realProfileRegistry.getProfile("PlatformProfile"); >+ assertNotNull(profile); >+ } >+ >+ public void testInstall() { >+ IPlanner planner = createPlanner(); >+ >+ IInstallableUnit b = createIU("b", Version.create("1.0")); >+ IProfileChangeRequest changeRequest = new ProfileChangeRequest(profile); >+ changeRequest.remove(b); >+ IProvisioningPlan plan = planner.getProvisioningPlan(changeRequest, null, new NullProgressMonitor()); >+ IQueryable result = plan.getRemovals(); >+ IQueryResult<IInstallableUnit> r = result.query(QueryUtil.ALL_UNITS, getMonitor()); >+ assertFalse("1.0", r.isEmpty()); >+ } >+} >Index: testData/bug306424/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/123.profile >=================================================================== >RCS file: testData/bug306424/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/123.profile >diff -N testData/bug306424/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/123.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ testData/bug306424/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/123.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,83 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<?profile version='1.0.0'?> >+<profile id='PlatformProfile' timestamp='1266347403310'> >+ <properties size='8'> >+ <property name='org.eclipse.equinox.p2.installFolder' value='C:\temp\zzz.plat\eclipse'/> >+ <property name='org.eclipse.equinox.p2.cache' value='C:\temp\zzz.plat\eclipse'/> >+ <property name='org.eclipse.update.install.features' value='true'/> >+ <property name='org.eclipse.equinox.p2.roaming' value='true'/> >+ <property name='org.eclipse.equinox.p2.flavor' value='tooling'/> >+ <property name='org.eclipse.equinox.p2.environments' value='osgi.ws=win32,osgi.os=win32,osgi.arch=x86'/> >+ <property name='eclipse.touchpoint.launcherName' value='eclipse'/> >+ <property name='org.eclipse.equinox.p2.cache.extensions' value='file:/C:/temp/zzz.plat/eclipse/.eclipseextension|file:/C:/temp/zzz.plat/eclipse/configuration/org.eclipse.osgi/bundles/81/data/listener_1925729951/'/> >+ </properties> >+ <units size='2'> >+ <unit id='a' version='1.0.0' singleton='false'> >+ <update id='a' range='[0.0.0,1.0.0)' severity='0'/> >+ <properties size='3'> >+ <property name='org.eclipse.equinox.p2.name' value='A'/> >+ <property name='file.name' value='C:\temp\zzz.plat\eclipse\dropins\a_1.0.0.jar'/> >+ <property name='file.lastModified' value='1268923175284'/> >+ </properties> >+ <provides size='3'> >+ <provided namespace='org.eclipse.equinox.p2.iu' name='a' version='1.0.0'/> >+ <provided namespace='osgi.bundle' name='a' version='1.0.0'/> >+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/> >+ </provides> >+ <requires size='1'> >+ <required namespace='osgi.bundle' name='b' range='0.0.0'/> >+ </requires> >+ <artifacts size='1'> >+ <artifact classifier='osgi.bundle' id='a' 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'> >+ Bundle-ManifestVersion: 2
Bundle-SymbolicName: a
Require-Bundle: b
Bundle-Name: A
Manifest-Version: 1.0
Bundle-Version: 1.0.0
 >+ </instruction> >+ </instructions> >+ </touchpointData> >+ </unit> >+ <unit id='b' version='1.0.0' singleton='false'> >+ <update id='b' range='[0.0.0,1.0.0)' severity='0'/> >+ <properties size='3'> >+ <property name='org.eclipse.equinox.p2.name' value='B'/> >+ <property name='file.name' value='C:\temp\zzz.plat\eclipse\dropins\b_1.0.0.jar'/> >+ <property name='file.lastModified' value='1268923175314'/> >+ </properties> >+ <provides size='3'> >+ <provided namespace='org.eclipse.equinox.p2.iu' name='b' version='1.0.0'/> >+ <provided namespace='osgi.bundle' name='b' 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='b' 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'> >+ Bundle-SymbolicName: b
Bundle-ManifestVersion: 2
Bundle-Version: 1.0.0
Bundle-Name: B
Manifest-Version: 1.0
 >+ </instruction> >+ </instructions> >+ </touchpointData> >+ </unit> >+ </units> >+ <iusProperties size='2'> >+ <iuProperties id='a' version='1.0.0'> >+ <properties size='3'> >+ <property name='org.eclipse.equinox.p2.type.lock' value='1'/> >+ <property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='OPTIONAL'/> >+ <property name='org.eclipse.equinox.p2.reconciler.dropins' value='true'/> >+ </properties> >+ </iuProperties> >+ <iuProperties id='b' version='1.0.0'> >+ <properties size='3'> >+ <property name='org.eclipse.equinox.p2.type.lock' value='1'/> >+ <property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='OPTIONAL'/> >+ <property name='org.eclipse.equinox.p2.reconciler.dropins' value='true'/> >+ </properties> >+ </iuProperties> >+ </iusProperties> >+</profile>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 306424
: 162460