[jboss-cvs] JBossAS SVN: r90465 - in projects/jboss-osgi/trunk: testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 19 03:57:14 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-19 03:57:14 -0400 (Fri, 19 Jun 2009)
New Revision: 90465

Modified:
   projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
Log:
[JBOSGI-107] MC service cannot be refreshed

Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-06-19 07:55:30 UTC (rev 90464)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/RemoteRuntime.java	2009-06-19 07:57:14 UTC (rev 90465)
@@ -221,7 +221,9 @@
    public void shutdown()
    {
       super.shutdown();
-      getPackageAdmin().refreshPackages(null);
+      
+      // https://jira.jboss.org/jira/browse/JBOSGI-107
+      //getPackageAdmin().refreshPackages(null);
    }
 
    private RemoteFramework getRemoteFramework()

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2009-06-19 07:55:30 UTC (rev 90464)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2009-06-19 07:57:14 UTC (rev 90465)
@@ -46,8 +46,6 @@
 public class MicrocontainerTestCase
 {
    static OSGiRuntime runtime;
-   static OSGiBundle bundleA;
-   static OSGiBundle bundleB;
 
    @BeforeClass
    public static void setUpClass() throws Exception
@@ -56,8 +54,8 @@
       runtime.addCapability(new JNDICapability());
       runtime.addCapability(new MicrocontainerCapability());
       
-      bundleA = runtime.installBundle("example-mcservice-bundleA.jar");
-      bundleB = runtime.installBundle("example-mcservice-bundleB.jar");
+      OSGiBundle bundleA = runtime.installBundle("example-mcservice-bundleA.jar");
+      runtime.installBundle("example-mcservice-bundleB.jar");
       
       bundleA.start();
    }
@@ -65,20 +63,21 @@
    @AfterClass
    public static void tearDownClass() throws Exception
    {
-      if (bundleA != null)
-         bundleA.uninstall();
-      
-      if (bundleB != null)
-         bundleB.uninstall();
-      
-      runtime.shutdown();
+      if (runtime != null)
+         runtime.shutdown();
    }
 
    @Test
-   public void testServiceRoundTrip() throws Exception
+   public void testBeanAccess() throws Exception
    {
       SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, MBEAN_NAME, runtime.getMBeanServer());
       assertEquals("hello", someBean.echo("hello"));
+   }
+
+   @Test
+   public void testServiceService() throws Exception
+   {
+      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, MBEAN_NAME, runtime.getMBeanServer());
       assertEquals("hello", someBean.callSomeService("hello"));
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java	2009-06-19 07:55:30 UTC (rev 90464)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java	2009-06-19 07:57:14 UTC (rev 90465)
@@ -31,6 +31,7 @@
 import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
@@ -129,6 +130,7 @@
    }
 
    @Test
+   @Ignore(value="[JBOSGI-107] MC service cannot be refreshed")
    public void testWiringToUninstalledPackageAdmin() throws Exception
    {
       OSGiRuntime runtime = getDefaultRuntime();




More information about the jboss-cvs-commits mailing list