[jboss-cvs] JBossAS SVN: r93518 - in projects/jboss-osgi/trunk/testsuite: functional/src/test/java/org/jboss/test/osgi/capabilities and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 15 05:54:25 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-09-15 05:54:24 -0400 (Tue, 15 Sep 2009)
New Revision: 93518

Modified:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java
   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/jbosgi37/OSGI37TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelTestCase.java
   projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Use CompendiumCapability

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java	2009-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -61,7 +61,6 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
          runtime.addCapability(new LogServiceCapability());
          
          OSGiBundle bundle = runtime.getBundle("jboss-osgi-apache-xerces", null);
@@ -93,7 +92,6 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
          runtime.addCapability(new LogServiceCapability());
          
          OSGiBundle bundle = runtime.getBundle("jboss-osgi-jaxb", null);
@@ -116,7 +114,6 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
          runtime.addCapability(new LogServiceCapability());
          
          OSGiBundle bundle = runtime.getBundle("jboss-osgi-xml-binding", null);
@@ -139,7 +136,6 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
          runtime.addCapability(new LogServiceCapability());
          
          OSGiBundle bundle = runtime.getBundle("jboss-osgi-jndi", null);
@@ -162,7 +158,6 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
          runtime.addCapability(new LogServiceCapability());
          
          OSGiBundle bundle = runtime.getBundle("jboss-osgi-jmx", null);

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-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi151/OSGI151TestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -34,7 +34,6 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.launch.Framework;
-import org.osgi.service.http.HttpService;
 
 /**
  * [JBOSGI-151] Cannot resolve circular dependencies
@@ -111,7 +110,6 @@
    }
 
    @Test
-   @Ignore
    public void testCircularInstallCbeforeD() throws Exception
    {
       BundleContext sysContext = framework.getBundleContext();
@@ -164,31 +162,7 @@
       bundleD.uninstall();
       bundleC.uninstall();
    }
-
-   @Test
-   @Ignore
-   public void testCompendiumAndHttpService() throws Exception
-   {
-      BundleContext sysContext = framework.getBundleContext();
-      
-      Bundle httpBundle = sysContext.installBundle(getBundleLocation("bundles/org.apache.felix.http.jetty.jar"));
-      assertEquals("INSTALLED expected", Bundle.INSTALLED, httpBundle.getState());
-      
-      Bundle cmpnBundle = sysContext.installBundle(getBundleLocation("bundles/org.osgi.compendium.jar"));
-      assertEquals("INSTALLED expected", Bundle.INSTALLED, cmpnBundle.getState());
-
-      httpBundle.start();
-      assertEquals("ACTIVE expected", Bundle.ACTIVE, httpBundle.getState());
-      assertEquals("RESOLVED expected", Bundle.RESOLVED, cmpnBundle.getState());
-      
-      Class<?> classCmpn = cmpnBundle.loadClass(HttpService.class.getName());
-      Class<?> classHttp = httpBundle.loadClass(HttpService.class.getName());
-      assertEquals("Class for BeanB", classCmpn, classHttp);
-      
-      httpBundle.uninstall();
-      cmpnBundle.uninstall();
-   }
-
+   
    private String getBundleLocation(String jarname)
    {
       return new OSGiTestHelper().getTestArchiveURL(jarname).toExternalForm();

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-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -28,6 +28,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.jboss.osgi.spi.capability.CompendiumCapability;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
@@ -50,7 +51,7 @@
       OSGiRuntime runtime = getDefaultRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundleA = runtime.installBundle("jbosgi37-bundleA.jar");
          bundleA.start();

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java	2009-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -27,6 +27,7 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import org.jboss.osgi.spi.capability.CompendiumCapability;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
@@ -58,7 +59,7 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
          assertTrue("Bundle installed", bundleX.getState() <= Bundle.RESOLVED);
@@ -83,7 +84,7 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
          assertTrue("Bundle installed", bundleX.getState() <= Bundle.RESOLVED);
@@ -112,7 +113,7 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
          assertTrue("Bundle installed", bundleX.getState() <= Bundle.RESOLVED);
@@ -145,7 +146,7 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
          assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
@@ -184,7 +185,7 @@
       OSGiRuntime runtime = getEmbeddedRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundleA = runtime.installBundle("jbosgi38-bundleA.jar");
          assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java	2009-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -54,7 +54,6 @@
       OSGiRuntime runtime = getDefaultRuntime();
       try
       {
-         runtime.installCompendium();
          runtime.addCapability(new ConfigAdminCapability());
          
          OSGiBundle bundleA = runtime.installBundle("jbosgi41-bundleA.jar");

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java	2009-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -68,7 +68,6 @@
    {
       runtime = new OSGiTestHelper().getDefaultRuntime();
       
-      runtime.installCompendium();
       runtime.addCapability(new JNDICapability());
       runtime.addCapability(new JMXCapability());
       runtime.addCapability(new XMLBindingCapability());

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelTestCase.java	2009-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelTestCase.java	2009-09-15 09:54:24 UTC (rev 93518)
@@ -25,6 +25,7 @@
 
 import static org.junit.Assert.assertEquals;
 
+import org.jboss.osgi.spi.capability.CompendiumCapability;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
@@ -45,7 +46,7 @@
       OSGiRuntime runtime = getDefaultRuntime();
       try
       {
-         runtime.installCompendium();
+         runtime.addCapability(new CompendiumCapability());
          
          OSGiBundle bundle = runtime.installBundle("service/startlevel.jar");
          bundle.start();

Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml	2009-09-15 09:36:31 UTC (rev 93517)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml	2009-09-15 09:54:24 UTC (rev 93518)
@@ -397,6 +397,12 @@
           <groupId>org.jboss.jbossas</groupId>
           <artifactId>jboss-as-client</artifactId>
           <version>${version.jbossas.client}</version>
+          <exclusions>
+            <exclusion>
+              <groupId>org.jboss</groupId>
+              <artifactId>jboss-common-core</artifactId>
+            </exclusion>
+          </exclusions>
           <scope>test</scope>
           <type>pom</type>
         </dependency>




More information about the jboss-cvs-commits mailing list