Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2011-07-26 18:15:54 +0000
committerThomas Watson2011-07-26 18:15:54 +0000
commitf2bb8d0b941fc6c3b9c2c43f1df73ebd2f3048ca (patch)
treedaffd7ea227df1853367318ab56083ed6eb1a883 /bundles/org.eclipse.osgi.tests
parent25adc962ef117d879d9ca5713a8f64af2af4834a (diff)
downloadrt.equinox.framework-f2bb8d0b941fc6c3b9c2c43f1df73ebd2f3048ca.tar.gz
rt.equinox.framework-f2bb8d0b941fc6c3b9c2c43f1df73ebd2f3048ca.tar.xz
rt.equinox.framework-f2bb8d0b941fc6c3b9c2c43f1df73ebd2f3048ca.zip
Bug 353103 - ConcurrentModificationException during resolver fragment processing
Diffstat (limited to 'bundles/org.eclipse.osgi.tests')
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java
index 0b6923323..547e4d7c6 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java
@@ -2097,6 +2097,15 @@ public class StateResolverTest extends AbstractStateTest {
manifest.put(Constants.IMPORT_PACKAGE, "b, c"); //$NON-NLS-1$
BundleDescription aFrag3 = state.getFactory().createBundleDescription(state, manifest, (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME) + "_" + manifest.get(Constants.BUNDLE_VERSION), id++); //$NON-NLS-1$
+ // Bug 353103 need to create a bundle that has the same unresolved imports as other bundles
+ manifest = new Hashtable();
+ manifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$
+ manifest.put(Constants.BUNDLE_SYMBOLICNAME, "aFrag4"); //$NON-NLS-1$
+ manifest.put(Constants.BUNDLE_VERSION, "1.0.0"); //$NON-NLS-1$
+ manifest.put(Constants.FRAGMENT_HOST, "a"); //$NON-NLS-1$
+ manifest.put(Constants.IMPORT_PACKAGE, "b, c, d, e"); //$NON-NLS-1$
+ BundleDescription aFrag4 = state.getFactory().createBundleDescription(state, manifest, (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME) + "_" + manifest.get(Constants.BUNDLE_VERSION), id++); //$NON-NLS-1$
+
manifest = new Hashtable();
manifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$
manifest.put(Constants.BUNDLE_SYMBOLICNAME, "b"); //$NON-NLS-1$
@@ -2108,6 +2117,7 @@ public class StateResolverTest extends AbstractStateTest {
state.addBundle(aFrag1);
state.addBundle(aFrag2);
state.addBundle(aFrag3);
+ state.addBundle(aFrag4);
state.addBundle(b);
state.resolve();
@@ -2115,7 +2125,8 @@ public class StateResolverTest extends AbstractStateTest {
assertFalse("0.2", aFrag1.isResolved()); //$NON-NLS-1$
assertFalse("0.3", aFrag2.isResolved()); //$NON-NLS-1$
assertTrue("0.4", aFrag3.isResolved()); //$NON-NLS-1$
- assertTrue("0.5", b.isResolved()); //$NON-NLS-1$
+ assertFalse("0.5", aFrag4.isResolved()); //$NON-NLS-1$
+ assertTrue("0.6", b.isResolved()); //$NON-NLS-1$
ExportPackageDescription[] aResolvedImports = a.getResolvedImports();
ExportPackageDescription[] bSelectedExports = b.getSelectedExports();
@@ -2165,6 +2176,15 @@ public class StateResolverTest extends AbstractStateTest {
manifest.put(Constants.IMPORT_PACKAGE, "b, c"); //$NON-NLS-1$
BundleDescription aFrag3 = state.getFactory().createBundleDescription(state, manifest, (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME) + "_" + manifest.get(Constants.BUNDLE_VERSION), id++); //$NON-NLS-1$
+ // Bug 353103 need to create a bundle that has the same unresolved imports as other bundles
+ manifest = new Hashtable();
+ manifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$
+ manifest.put(Constants.BUNDLE_SYMBOLICNAME, "aFrag4"); //$NON-NLS-1$
+ manifest.put(Constants.BUNDLE_VERSION, "1.0.0"); //$NON-NLS-1$
+ manifest.put(Constants.FRAGMENT_HOST, "a"); //$NON-NLS-1$
+ manifest.put(Constants.IMPORT_PACKAGE, "b, c, d, e"); //$NON-NLS-1$
+ BundleDescription aFrag4 = state.getFactory().createBundleDescription(state, manifest, (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME) + "_" + manifest.get(Constants.BUNDLE_VERSION), id++); //$NON-NLS-1$
+
manifest = new Hashtable();
manifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$
manifest.put(Constants.BUNDLE_SYMBOLICNAME, "b"); //$NON-NLS-1$
@@ -2177,6 +2197,7 @@ public class StateResolverTest extends AbstractStateTest {
state.addBundle(aFrag1);
state.addBundle(aFrag2);
state.addBundle(aFrag3);
+ state.addBundle(aFrag4);
state.addBundle(b);
state.resolve();
@@ -2184,7 +2205,8 @@ public class StateResolverTest extends AbstractStateTest {
assertFalse("0.2", aFrag1.isResolved()); //$NON-NLS-1$
assertFalse("0.3", aFrag2.isResolved()); //$NON-NLS-1$
assertTrue("0.4", aFrag3.isResolved()); //$NON-NLS-1$
- assertTrue("0.5", b.isResolved()); //$NON-NLS-1$
+ assertFalse("0.5", aFrag4.isResolved()); //$NON-NLS-1$
+ assertTrue("0.6", b.isResolved()); //$NON-NLS-1$
ExportPackageDescription[] aResolvedImports = a.getResolvedImports();
ExportPackageDescription[] aSelectedExports = a.getSelectedExports();

Back to the top