[jboss-cvs] JBossAS SVN: r96746 - in projects/jboss-osgi/trunk: testsuite/functional and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Nov 23 12:45:18 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-11-23 12:45:18 -0500 (Mon, 23 Nov 2009)
New Revision: 96746

Removed:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/service/mcservice/
Modified:
   projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
   projects/jboss-osgi/trunk/testsuite/functional/pom.xml
   projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java
Log:
Document MC Framework resolver test failures

Modified: projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java	2009-11-23 17:39:11 UTC (rev 96745)
+++ projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java	2009-11-23 17:45:18 UTC (rev 96746)
@@ -98,8 +98,8 @@
          
          PackageAdminPlugin packageAdmin = bundleManager.getPlugin(PackageAdminPlugin.class);
          boolean allResoved = packageAdmin.resolveBundles(null);
-         if (allResoved == false)
-            System.out.println("FIXME: testRandomBundleResolution");
+         //assertTrue("All bundles resolved", allResoved);
+         System.out.println("[JBOSGI-151] Cannot resolve circular dependencies");
       }
       finally
       {

Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml	2009-11-23 17:39:11 UTC (rev 96745)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml	2009-11-23 17:45:18 UTC (rev 96746)
@@ -259,15 +259,17 @@
             <configuration>
               <excludes>
                 <exclude>${target.container.excludes}</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi39/**</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi41/**</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi99/**</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi108/**</exclude>
+                <!-- [JBOSGI-143] Add initial support for DynamicImport-Package -->
                 <exclude>org/jboss/test/osgi/jbosgi143/**</exclude>
+                <!-- [JBOSGI-151] Cannot resolve circular dependencies -->
                 <exclude>org/jboss/test/osgi/jbosgi151/**</exclude>
-                <exclude>org/jboss/test/osgi/service/microcontainer/**</exclude>
                 <!-- [JBOSGI-204] Failure in Bundle.start() uninstalls the bundle -->
                 <exclude>org/jboss/test/osgi/jbosgi99/**</exclude>
+                <!-- [JBOSGI-206] Wire to an already uninstalled bundle -->
+                <exclude>org/jboss/test/osgi/jbosgi39/**</exclude>
+                <exclude>org/jboss/test/osgi/jbosgi108/**</exclude>
+                <!-- [JBOSGI-207] Implement persistent file storage -->
+                <exclude>org/jboss/test/osgi/jbosgi41/**</exclude>
               </excludes>
             </configuration>
           </plugin>
@@ -308,14 +310,17 @@
             <configuration>
               <excludes>
                 <exclude>${target.container.excludes}</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi39/**</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi41/**</exclude>
-                <exclude>org/jboss/test/osgi/jbosgi108/**</exclude>
+                <!-- [JBOSGI-143] Add initial support for DynamicImport-Package -->
                 <exclude>org/jboss/test/osgi/jbosgi143/**</exclude>
+                <!-- [JBOSGI-151] Cannot resolve circular dependencies -->
                 <exclude>org/jboss/test/osgi/jbosgi151/**</exclude>
-                <exclude>org/jboss/test/osgi/service/microcontainer/**</exclude>
                 <!-- [JBOSGI-204] Failure in Bundle.start() uninstalls the bundle -->
                 <exclude>org/jboss/test/osgi/jbosgi99/**</exclude>
+                <!-- [JBOSGI-206] Wire to an already uninstalled bundle -->
+                <exclude>org/jboss/test/osgi/jbosgi39/**</exclude>
+                <exclude>org/jboss/test/osgi/jbosgi108/**</exclude>
+                <!-- [JBOSGI-207] Implement persistent file storage -->
+                <exclude>org/jboss/test/osgi/jbosgi41/**</exclude>
               </excludes>
             </configuration>
           </plugin>

Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml	2009-11-23 17:39:11 UTC (rev 96745)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml	2009-11-23 17:45:18 UTC (rev 96746)
@@ -136,10 +136,6 @@
     <!-- startlevel -->
     <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/startlevel.jar" files="${tests.resources.dir}/service/startlevel/startlevel.bnd" />
 
-    <!-- mcservice -->
-    <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/mcservice-bundleA.jar" files="${tests.resources.dir}/service/mcservice/mcservice-bundleA.bnd" />
-    <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/mcservice-bundleB.jar" files="${tests.resources.dir}/service/mcservice/mcservice-bundleB.bnd" />
-    
     <!-- Please add alphabetically -->
 
   </target>

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java	2009-11-23 17:39:11 UTC (rev 96745)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi143/OSGI143TestCase.java	2009-11-23 17:45:18 UTC (rev 96746)
@@ -28,7 +28,7 @@
 
 import org.jboss.osgi.spi.framework.OSGiBootstrap;
 import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.OSGiTest;
 import org.jboss.test.osgi.jbosgi143.bundleA.BeanA;
 import org.jboss.test.osgi.jbosgi143.bundleX.BeanX;
 import org.junit.Test;
@@ -49,7 +49,7 @@
  * @author thomas.diesler at jboss.com
  * @since 28-Aug-2009
  */
-public class OSGI143TestCase
+public class OSGI143TestCase extends OSGiTest
 {
    @Test
    public void testLoadClass() throws Exception
@@ -58,22 +58,27 @@
       Framework framework = bootProvider.getFramework();
       framework.start();
       
-      BundleContext sysContext = framework.getBundleContext();
-      Bundle bundleX = sysContext.installBundle(getBundleLocation("jbosgi143-bundleX.jar"));
-      bundleX.start();
-      
-      assertBundleLoadClass(bundleX, BeanX.class, true);
-      
-      Bundle bundleA = sysContext.installBundle(getBundleLocation("jbosgi143-bundleA.jar"));
-      bundleA.start();
-      
-      assertBundleLoadClass(bundleA, BeanA.class, true);
-      
-      assertBundleLoadClass(bundleA, BeanX.class, true);
-      assertBundleLoadClass(bundleX, BeanA.class, true);
-      
-      framework.stop();
-      framework.waitForStop(1000);
+      try
+      {
+         BundleContext sysContext = framework.getBundleContext();
+         Bundle bundleX = sysContext.installBundle(getTestArchivePath("jbosgi143-bundleX.jar"));
+         bundleX.start();
+         
+         assertBundleLoadClass(bundleX, BeanX.class, true);
+         
+         Bundle bundleA = sysContext.installBundle(getTestArchivePath("jbosgi143-bundleA.jar"));
+         bundleA.start();
+         
+         assertBundleLoadClass(bundleA, BeanA.class, true);
+         
+         assertBundleLoadClass(bundleA, BeanX.class, true);
+         assertBundleLoadClass(bundleX, BeanA.class, true);
+      }
+      finally
+      {
+         framework.stop();
+         framework.waitForStop(1000);
+      }
    }
 
    private void assertBundleLoadClass(Bundle bundle, Class<?> expClazz, boolean success) 
@@ -99,9 +104,4 @@
             fail("Unexpected ClassNotFoundException for: " + message);
       }
    }
-
-   private String getBundleLocation(String jarname)
-   {
-      return new OSGiTestHelper().getTestArchiveURL(jarname).toExternalForm();
-   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java	2009-11-23 17:39:11 UTC (rev 96745)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java	2009-11-23 17:45:18 UTC (rev 96746)
@@ -25,7 +25,7 @@
 
 import org.jboss.osgi.spi.framework.OSGiBootstrap;
 import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.OSGiTest;
 import org.jboss.test.osgi.jbosgi151.bundleA.BeanA;
 import org.jboss.test.osgi.jbosgi151.bundleB.BeanB;
 import org.junit.AfterClass;
@@ -60,7 +60,7 @@
  * @author thomas.diesler at jboss.com
  * @since 07-Sep-2009
  */
-public class OSGI151TestCase
+public class OSGI151TestCase extends OSGiTest
 {
    private static Framework framework;
    
@@ -89,10 +89,10 @@
    {
       BundleContext sysContext = framework.getBundleContext();
       
-      Bundle bundleA = sysContext.installBundle(getBundleLocation("jbosgi151-bundleA.jar"));
+      Bundle bundleA = sysContext.installBundle(getTestArchivePath("jbosgi151-bundleA.jar"));
       assertEquals("INSTALLED expected", Bundle.INSTALLED, bundleA.getState());
 
-      Bundle bundleB = sysContext.installBundle(getBundleLocation("jbosgi151-bundleB.jar"));
+      Bundle bundleB = sysContext.installBundle(getTestArchivePath("jbosgi151-bundleB.jar"));
       assertEquals("INSTALLED expected", Bundle.INSTALLED, bundleB.getState());
       
       bundleB.start();
@@ -116,10 +116,10 @@
    {
       BundleContext sysContext = framework.getBundleContext();
       
-      Bundle bundleC = sysContext.installBundle(getBundleLocation("jbosgi151-bundleC.jar"));
+      Bundle bundleC = sysContext.installBundle(getTestArchivePath("jbosgi151-bundleC.jar"));
       assertEquals("INSTALLED expected", Bundle.INSTALLED, bundleC.getState());
 
-      Bundle bundleD = sysContext.installBundle(getBundleLocation("jbosgi151-bundleD.jar"));
+      Bundle bundleD = sysContext.installBundle(getTestArchivePath("jbosgi151-bundleD.jar"));
       assertEquals("INSTALLED expected", Bundle.INSTALLED, bundleD.getState());
       
       bundleD.start();
@@ -143,10 +143,10 @@
    {
       BundleContext sysContext = framework.getBundleContext();
       
-      Bundle bundleD = sysContext.installBundle(getBundleLocation("jbosgi151-bundleD.jar"));
+      Bundle bundleD = sysContext.installBundle(getTestArchivePath("jbosgi151-bundleD.jar"));
       assertEquals("INSTALLED expected", Bundle.INSTALLED, bundleD.getState());
       
-      Bundle bundleC = sysContext.installBundle(getBundleLocation("jbosgi151-bundleC.jar"));
+      Bundle bundleC = sysContext.installBundle(getTestArchivePath("jbosgi151-bundleC.jar"));
       assertEquals("INSTALLED expected", Bundle.INSTALLED, bundleC.getState());
 
       bundleD.start();
@@ -164,9 +164,4 @@
       bundleD.uninstall();
       bundleC.uninstall();
    }
-   
-   private String getBundleLocation(String jarname)
-   {
-      return new OSGiTestHelper().getTestArchiveURL(jarname).toExternalForm();
-   }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list