Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2015-01-16 21:09:44 +0000
committerThomas Watson2015-01-16 21:09:44 +0000
commitb57c97c7177699e33baca80cd305e20b17153526 (patch)
tree0655f7720dfadd172b53221d2cbb24e71a0bf5f3
parenta464c1c67a96df050efb67d69a1692886ecc134e (diff)
downloadrt.equinox.framework-b57c97c7177699e33baca80cd305e20b17153526.tar.gz
rt.equinox.framework-b57c97c7177699e33baca80cd305e20b17153526.tar.xz
rt.equinox.framework-b57c97c7177699e33baca80cd305e20b17153526.zip
Bug 457118 - OutOfMemoryError (Java Heap Space) when resolving bundlesI20150120-0800
- Finish test to ensure resolution backs off invalid paths correctly Change-Id: Ic6b320986e26d6a9d5ef094f12dc81158fc3aec8 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java9
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a.MF2
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a2.MF6
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b.MF2
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b2.MF6
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c.MF2
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c2.MF6
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.d2.MF5
-rw-r--r--bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.e.MF1
9 files changed, 36 insertions, 3 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 7f10f05e5..c1a834e5f 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
@@ -1808,6 +1808,11 @@ public class TestModuleContainer extends AbstractTest {
Module c = installDummyModule("bug457118.c.MF", "c", container);
Module d = installDummyModule("bug457118.d.MF", "d", container);
+ Module a2 = installDummyModule("bug457118.a2.MF", "a2", container);
+ Module b2 = installDummyModule("bug457118.b2.MF", "b2", container);
+ Module c2 = installDummyModule("bug457118.c2.MF", "c2", container);
+ Module d2 = installDummyModule("bug457118.d2.MF", "d2", container);
+
container.resolve(null, true);
Assert.assertEquals("e should resolve.", State.RESOLVED, e.getState());
@@ -1815,6 +1820,10 @@ public class TestModuleContainer extends AbstractTest {
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());
+
+ List<ModuleWire> bundleWires = e.getCurrentRevision().getWiring().getRequiredModuleWires(BundleNamespace.BUNDLE_NAMESPACE);
+ Assert.assertEquals("Wrong number of bundle wires: " + bundleWires, 1, bundleWires.size());
+ Assert.assertEquals("Wrong bundle provider", a.getCurrentRevision(), bundleWires.get(0).getProvider());
}
private static void assertWires(List<ModuleWire> required, List<ModuleWire>... provided) {
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a.MF
index 0f7a10b51..57c628972 100644
--- a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a.MF
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a.MF
@@ -3,4 +3,4 @@ Bundle-SymbolicName: a
Bundle-Version: 1.0.0
Export-Package:
a; version=1.0; uses:="b,c"
-Require-Bundle: b, c
+Require-Bundle: b; bundle-version="[1.0,1.1)", c; bundle-version="[1.0,1.1)"
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a2.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a2.MF
new file mode 100644
index 000000000..1c05ed0f8
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.a2.MF
@@ -0,0 +1,6 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: a
+Bundle-Version: 1.1.0
+Export-Package:
+ a; version=1.0; uses:="b,c"
+Require-Bundle: b; bundle-version="[1.1,1.2)", c; bundle-version="[1.1,1.2)"
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b.MF
index 8b891183b..9747ea809 100644
--- a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b.MF
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b.MF
@@ -3,4 +3,4 @@ Bundle-SymbolicName: b
Bundle-Version: 1.0.0
Export-Package:
b; version=1.0; uses:="d"
-Require-Bundle: d; visibility:=reexport
+Require-Bundle: d; bundle-version="[1.0,1.1)"; visibility:=reexport
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b2.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b2.MF
new file mode 100644
index 000000000..9c103786e
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.b2.MF
@@ -0,0 +1,6 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: b
+Bundle-Version: 1.1.0
+Export-Package:
+ b; version=1.1; uses:="d"
+Require-Bundle: d; bundle-version="[1.1,1.2)"; visibility:=reexport
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c.MF
index 7d548524c..5f6a7e7a4 100644
--- a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c.MF
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c.MF
@@ -3,4 +3,4 @@ Bundle-SymbolicName: c
Bundle-Version: 1.0.0
Export-Package:
c; version=1.0; uses:="d"
-Require-Bundle: d; visibility:=reexport
+Require-Bundle: d; bundle-version="[1.0,1.1)"; visibility:=reexport
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c2.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c2.MF
new file mode 100644
index 000000000..89a6f7138
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.c2.MF
@@ -0,0 +1,6 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: c
+Bundle-Version: 1.1.0
+Export-Package:
+ c; version=1.1; uses:="d"
+Require-Bundle: d; bundle-version="[1.1,1.2)"; visibility:=reexport
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.d2.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.d2.MF
new file mode 100644
index 000000000..c252d69ff
--- /dev/null
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.d2.MF
@@ -0,0 +1,5 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: d
+Bundle-Version: 1.1.0
+Export-Package:
+ d; version=1.1
diff --git a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.e.MF b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.e.MF
index d313fe9f5..0818ef8f0 100644
--- a/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.e.MF
+++ b/bundles/org.eclipse.osgi.tests/test_files/containerTests/bug457118.e.MF
@@ -3,4 +3,5 @@ Bundle-SymbolicName: e
Bundle-Version: 1.0.0
Export-Package:
e; version=1.0; uses:="a"
+Import-Package: d; version="[1.0, 1.1)"
Require-Bundle: a

Back to the top