felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1199147 - /felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestResolver.java
Date Tue, 08 Nov 2011 08:02:30 GMT
Author: rickhall
Date: Tue Nov  8 08:02:30 2011
New Revision: 1199147

URL: http://svn.apache.org/viewvc?rev=1199147&view=rev
Log:
Uncomment a portion of the system bundle export test, since it still
provides some coverage.

Modified:
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestResolver.java

Modified: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestResolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestResolver.java?rev=1199147&r1=1199146&r2=1199147&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestResolver.java
(original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestResolver.java
Tue Nov  8 08:02:30 2011
@@ -146,9 +146,7 @@ public class TestResolver extends FelixT
             cleanupBundles();
         }
     }
-/*
- * TODO: TEST CASE - Should consider moving this to a separate test project
- *       to avoid it refreshing the system bundle.
+
     public void testResolverSystemBundleExport() throws Exception
     {
         InputStream is = null;
@@ -164,41 +162,44 @@ public class TestResolver extends FelixT
         try
         {
             is = this.getClass().getClassLoader().getResourceAsStream("resolver.b004.jar");
-            addBundle(getBundleContext().installBundle("resolver.b004.jar", is));
+            addBundle("A", getBundleContext().installBundle("resolver.b004.jar", is));
 
-            m_bundleA.start();
+            getBundle("A").start();
 
             // The bundle imports all of the following packages, so it should
             // succeed in loading the classes.
-            m_bundleA.loadClass("javax.swing.JTable");
-            m_bundleA.loadClass("javax.swing.table.TableModel");
-            m_bundleA.loadClass("javax.swing.tree.TreeModel");
+            getBundle("A").loadClass("javax.swing.JTable");
+            getBundle("A").loadClass("javax.swing.table.TableModel");
+            getBundle("A").loadClass("javax.swing.tree.TreeModel");
 
             // The system bundle does not export the following package, so it
             // should fail.
             try
             {
-                m_bundleA.loadClass("org.apache.felix.framework.Felix");
+                getBundle("A").loadClass("org.apache.felix.framework.Felix");
                 throw new Exception("Class should not be found.");
             }
             catch (Exception ex)
             {
                 // Expecting an exception here.
             }
-
+/*
+ * TODO: TEST CASE - Should consider moving this to a separate test project
+ *       to avoid it refreshing the system bundle.
             // Install a system bundle extension that exports Felix
             // framework package.
             is = this.getClass().getClassLoader().getResourceAsStream("resolver.b005.jar");
-            addBundle(getBundleContext().installBundle("resolver.b005.jar", is));
+            addBundle("B", getBundleContext().installBundle("resolver.b005.jar", is));
             // Now attempt to load the framework class, which should succeed.
-            m_bundleA.loadClass("org.apache.felix.framework.Felix");
+            getBundle("A").loadClass("org.apache.felix.framework.Felix");
+*/
         }
         finally
         {
-            cleanup();
+            cleanupBundles();
         }
     }
-*/
+
     public void testResolverBrokenCycles() throws Exception
     {
         InputStream is = null;



Mime
View raw message