You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2010/12/03 20:17:20 UTC
svn commit: r1041958 -
/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java
Author: rickhall
Date: Fri Dec 3 19:17:20 2010
New Revision: 1041958
URL: http://svn.apache.org/viewvc?rev=1041958&view=rev
Log:
The same package exported more than once should not be considered
a conflict for fragment imports.
Modified:
felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java
Modified: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java?rev=1041958&r1=1041957&r2=1041958&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java Fri Dec 3 19:17:20 2010
@@ -414,7 +414,8 @@ public class TestFragment extends FelixT
// Scenario #3
// Attach two fragments with non-overlapping version ranges for
- // an imported package.
+ // an imported package, but the capability is actually exported
+ // from the host multiple times so they should not conflict.
try
{
is = this.getClass().getClassLoader().getResourceAsStream("fragment.b009.jar");
@@ -434,9 +435,9 @@ public class TestFragment extends FelixT
"Fragment resource should be found.", m_bundleB.getResource("b012.txt"));
assertEquals(
- "Fragment should not be resolved.", m_bundleD.getState(), Bundle.INSTALLED);
- assertNull(
- "Fragment resource should not be found.", m_bundleB.getResource("b013.txt"));
+ "Fragment should be resolved.", m_bundleD.getState(), Bundle.RESOLVED);
+ assertNotNull(
+ "Fragment resource should be found.", m_bundleB.getResource("b013.txt"));
}
finally
{
@@ -459,9 +460,9 @@ public class TestFragment extends FelixT
getPackageAdmin().resolveBundles(new Bundle[] { m_bundleB });
assertEquals(
- "Fragment should not be resolved.", m_bundleC.getState(), Bundle.INSTALLED);
- assertNull(
- "Fragment resource should not be found.", m_bundleB.getResource("b013.txt"));
+ "Fragment should not be resolved.", m_bundleC.getState(), Bundle.RESOLVED);
+ assertNotNull(
+ "Fragment resource should be found.", m_bundleB.getResource("b013.txt"));
assertEquals(
"Fragment should be resolved.", m_bundleD.getState(), Bundle.RESOLVED);