Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2015-01-15 17:26:25 +0000
committerThomas Watson2015-01-16 14:40:07 +0000
commitd25dd9e060c989637bd3f9fdee68d81fb9dfcc62 (patch)
tree7ba1cc7fb558f79aff44f5b99fbf67aeabe4e062 /bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
parent16bb483bd75d665c3ff6a554419ddf8ad93bab57 (diff)
downloadrt.equinox.framework-d25dd9e060c989637bd3f9fdee68d81fb9dfcc62.tar.gz
rt.equinox.framework-d25dd9e060c989637bd3f9fdee68d81fb9dfcc62.tar.xz
rt.equinox.framework-d25dd9e060c989637bd3f9fdee68d81fb9dfcc62.zip
Bug 457118 - OutOfMemoryError (Java Heap Space) when resolving bundles
- Add a option to control the batch size - Modify the batch loop to use a copy and list iterator - Added a test that has multiple require paths to a resource Change-Id: I0fe25b4ba266f6b51ffd8981a6942a72e708b158 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java')
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
index 69df07323..7f10f05e5 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
@@ -1794,6 +1794,29 @@ public class TestModuleContainer extends AbstractTest {
Assert.assertEquals("Wrong package name.", "biz", packageCaps.get(4).getAttributes().get(PackageNamespace.PACKAGE_NAMESPACE));
}
+ @Test
+ public void testBug457118() throws BundleException, IOException {
+ DummyContainerAdaptor adaptor = createDummyAdaptor();
+ ModuleContainer container = adaptor.getContainer();
+
+ Module systemBundle = installDummyModule("system.bundle.MF", Constants.SYSTEM_BUNDLE_LOCATION, container);
+
+ container.resolve(Arrays.asList(systemBundle), true);
+ Module e = installDummyModule("bug457118.e.MF", "e", container);
+ Module a = installDummyModule("bug457118.a.MF", "a", container);
+ Module b = installDummyModule("bug457118.b.MF", "b", container);
+ Module c = installDummyModule("bug457118.c.MF", "c", container);
+ Module d = installDummyModule("bug457118.d.MF", "d", container);
+
+ container.resolve(null, true);
+
+ Assert.assertEquals("e should resolve.", State.RESOLVED, e.getState());
+ Assert.assertEquals("a should resolve.", State.RESOLVED, a.getState());
+ Assert.assertEquals("b should resolve.", State.RESOLVED, b.getState());
+ Assert.assertEquals("c should resolve.", State.RESOLVED, c.getState());
+ Assert.assertEquals("d should resolve.", State.RESOLVED, d.getState());
+ }
+
private static void assertWires(List<ModuleWire> required, List<ModuleWire>... provided) {
for (ModuleWire requiredWire : required) {
for (List<ModuleWire> providedList : provided) {

Back to the top