[jboss-cvs] JBossAS SVN: r101538 - in projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi: jbosgi108 and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 26 08:16:40 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-02-26 08:16:39 -0500 (Fri, 26 Feb 2010)
New Revision: 101538

Modified:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGi39TestCase.java
Log:
[ARIES-177] Update to patched Aries SNAPSHOT

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java	2010-02-26 12:57:50 UTC (rev 101537)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/fragments/FragmentTestCase.java	2010-02-26 13:16:39 UTC (rev 101538)
@@ -30,8 +30,10 @@
 
 import java.net.URL;
 
+import org.jboss.osgi.jmx.FrameworkMBeanExt;
+import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.spi.capability.LogServiceCapability;
 import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiPackageAdmin;
 import org.jboss.osgi.testing.OSGiRuntime;
 import org.jboss.osgi.testing.OSGiTest;
 import org.jboss.test.osgi.fragments.fragA.FragBeanA;
@@ -56,6 +58,8 @@
    public void setUp() throws Exception
    {
       runtime = getDefaultRuntime();
+      runtime.addCapability(new LogServiceCapability());
+      runtime.addCapability(new JMXCapability());
    }
 
    @After
@@ -260,8 +264,8 @@
       }
 
       // Refreshing HostA causes the FragA to get attached
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(new OSGiBundle[] { hostA });
+      FrameworkMBeanExt frameworkMBean = (FrameworkMBeanExt)runtime.getFrameworkMBean();
+      frameworkMBean.refreshBundle(hostA.getBundleId());
 
       // Wait for the fragment to get attached
       int timeout = 2000;

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java	2010-02-26 12:57:50 UTC (rev 101537)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java	2010-02-26 13:16:39 UTC (rev 101538)
@@ -25,13 +25,14 @@
 
 import static org.junit.Assert.assertEquals;
 
+import java.io.IOException;
 import java.util.List;
 
+import org.jboss.osgi.jmx.FrameworkMBeanExt;
 import org.jboss.osgi.jmx.JMXCapability;
 import org.jboss.osgi.jmx.MBeanProxy;
 import org.jboss.osgi.spi.capability.LogServiceCapability;
 import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiPackageAdmin;
 import org.jboss.osgi.testing.OSGiRuntime;
 import org.jboss.osgi.testing.OSGiTestHelper;
 import org.jboss.test.osgi.jbosgi108.bundleA.SomeBeanMBean;
@@ -72,10 +73,10 @@
    }
 
    @Before
-   public void setUp()
+   public void setUp() throws IOException
    {
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(null);
+      FrameworkMBeanExt frameworkMBean = (FrameworkMBeanExt)runtime.getFrameworkMBean();
+      frameworkMBean.refreshBundles(null);
    }
 
    @Test
@@ -153,8 +154,8 @@
       // bundleA.SomeBean
 
       // Refresh all packages
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(null);
+      FrameworkMBeanExt frameworkMBean = (FrameworkMBeanExt)runtime.getFrameworkMBean();
+      frameworkMBean.refreshBundles(null);
 
       // Reinstall bundleA
       bundleA = runtime.installBundle("jbosgi108-bundleA.jar");

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	2010-02-26 12:57:50 UTC (rev 101537)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/OSGi39TestCase.java	2010-02-26 13:16:39 UTC (rev 101538)
@@ -25,8 +25,10 @@
 
 import static org.junit.Assert.fail;
 
+import org.jboss.osgi.jmx.FrameworkMBeanExt;
+import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.spi.capability.LogServiceCapability;
 import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiPackageAdmin;
 import org.jboss.osgi.testing.OSGiRuntime;
 import org.jboss.osgi.testing.OSGiTest;
 import org.junit.After;
@@ -52,12 +54,14 @@
    private OSGiRuntime runtime;
 
    @Before
-   public void setUp()
+   public void setUp() throws Exception
    {
       runtime = getDefaultRuntime();
+      runtime.addCapability(new LogServiceCapability());
+      runtime.addCapability(new JMXCapability());
       
-      OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
-      packageAdmin.refreshPackages(null);
+      FrameworkMBeanExt frameworkMBean = (FrameworkMBeanExt)runtime.getFrameworkMBean();
+      frameworkMBean.refreshBundles(null);
    }
 
    @After
@@ -145,8 +149,8 @@
       bundleB.uninstall();
 
       // Forces the update (replacement) or removal of packages exported by the specified bundles.
-      OSGiPackageAdmin packAdmin = runtime.getPackageAdmin();
-      packAdmin.refreshPackages(null);
+      FrameworkMBeanExt frameworkMBean = (FrameworkMBeanExt)runtime.getFrameworkMBean();
+      frameworkMBean.refreshBundles(null);
 
       // Install B without X
       bundleB = runtime.installBundle("jbosgi39-bundleB.jar");




More information about the jboss-cvs-commits mailing list