[jboss-osgi-commits] JBoss-OSGI SVN: r87475 - projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Fri Apr 17 02:59:03 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-04-17 02:59:03 -0400 (Fri, 17 Apr 2009)
New Revision: 87475

Modified:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
Log:
[JBOSGI-65] Uninstall jbosgi37 test bundle

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java	2009-04-17 06:39:27 UTC (rev 87474)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java	2009-04-17 06:59:03 UTC (rev 87475)
@@ -55,18 +55,24 @@
    public void testNestedBundle() throws Exception
    {
       Bundle bundleA = installBundle(sysContext, "jbosgi37-bundleA.jar", true);
-      
-      assertEquals("Bundle started", Bundle.ACTIVE, bundleA.getState());
-      
-      List<String> relevant = new ArrayList<String>();
-      for (Bundle bundle : sysContext.getBundles())
+      try
       {
-         String symbolicName = bundle.getSymbolicName();
-         if (symbolicName.startsWith("jbosgi37"))
-            relevant.add(symbolicName);
+         assertEquals("Bundle started", Bundle.ACTIVE, bundleA.getState());
+         
+         List<String> relevant = new ArrayList<String>();
+         for (Bundle bundle : sysContext.getBundles())
+         {
+            String symbolicName = bundle.getSymbolicName();
+            if (symbolicName.startsWith("jbosgi37"))
+               relevant.add(symbolicName);
+         }
+
+         assertEquals("No Sub Bundle", 1, relevant.size());
+         assertEquals("jbosgi37-bundleA", relevant.get(0));
       }
-
-      assertEquals("No Sub Bundle", 1, relevant.size());
-      assertEquals("jbosgi37-bundleA", relevant.get(0));
+      finally
+      {
+         bundleA.uninstall();
+      }
    }
 }
\ No newline at end of file




More information about the jboss-osgi-commits mailing list