[jboss-cvs] JBossAS SVN: r93470 - in projects/jboss-osgi/trunk: reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Sep 14 08:56:21 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-09-14 08:56:20 -0400 (Mon, 14 Sep 2009)
New Revision: 93470
Removed:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/FrameworkLaunchTestCase.java
Modified:
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
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/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:
Fix embedded rof Felix
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-09-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-09-14 12:56:20 UTC (rev 93470)
@@ -22,6 +22,7 @@
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
+ <include>*:jboss-osgi-jndi:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:org.apache.felix.log:jar</include>
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-09-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -78,7 +78,7 @@
{
if (context == null)
{
- runtime = new OSGiTestHelper().getDefaultRuntime();
+ runtime = new OSGiTestHelper().getEmbeddedRuntime();
runtime.addCapability(new HuskyCapability());
runtime.addCapability(new BlueprintCapability());
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/FrameworkLaunchTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/FrameworkLaunchTestCase.java 2009-09-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/FrameworkLaunchTestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.example.simple;
-
-//$Id: $
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.jboss.osgi.spi.framework.OSGiBootstrap;
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.spi.testing.OSGiTest;
-import org.jboss.test.osgi.example.simple.bundle.SimpleService;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.launch.Framework;
-
-/**
- * A test that deployes a bundle and verifies its state
- *
- * @author thomas.diesler at jboss.com
- * @since 28-Aug-2009
- */
-public class FrameworkLaunchTestCase extends OSGiTest
-{
- @Test
- public void testSimpleBundle() throws Exception
- {
- OSGiBootstrapProvider bootstrapProvider = OSGiBootstrap.getBootstrapProvider();
- Framework framework = bootstrapProvider.getFramework();
- framework.start();
-
- BundleContext sysContext = framework.getBundleContext();
-
- Bundle bundle = sysContext.installBundle(getBundleLocation("example-simple.jar"));
- assertEquals("example-simple", bundle.getSymbolicName());
-
- bundle.start();
- assertEquals("Bundle state", Bundle.ACTIVE, bundle.getState());
-
- BundleContext bndContext = bundle.getBundleContext();
- assertNotNull("BundleContext not null", bndContext);
-
- // getServiceReference from bundle context
- ServiceReference sref = bndContext.getServiceReference(SimpleService.class.getName());
- assertNotNull("ServiceReference not null", sref);
-
- // getServiceReference from system context
- sref = sysContext.getServiceReference(SimpleService.class.getName());
- assertNotNull("ServiceReference not null", sref);
-
- bundle.uninstall();
- assertEquals("Bundle state", Bundle.UNINSTALLED, bundle.getState());
-
- framework.stop();
- framework.waitForStop(5000);
- }
-
- private String getBundleLocation(String jarname)
- {
- return getTestArchiveURL(jarname).toExternalForm();
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-09-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-09-14 12:56:20 UTC (rev 93470)
@@ -165,6 +165,7 @@
<excludes>
<exclude>${target.container.excludes}</exclude>
<exclude>org/jboss/test/osgi/jbosgi142/**</exclude>
+ <exclude>org/jboss/test/osgi/jbosgi151/**</exclude>
</excludes>
</configuration>
</plugin>
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-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/capabilities/CapabilityTestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -39,6 +39,7 @@
import org.jboss.osgi.jbossxb.XMLBindingService;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
+import org.jboss.osgi.spi.capability.LogServiceCapability;
import org.jboss.osgi.spi.testing.OSGiBundle;
import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.spi.testing.OSGiServiceReference;
@@ -60,9 +61,8 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
- runtime.installBundle("bundles/org.apache.felix.log.jar").start();
- runtime.installBundle("bundles/jboss-osgi-common.jar").start();
+ runtime.installCompendium();
+ runtime.addCapability(new LogServiceCapability());
OSGiBundle bundle = runtime.getBundle("jboss-osgi-apache-xerces", null);
assertNull("Test bundle null", bundle);
@@ -93,9 +93,8 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
- runtime.installBundle("bundles/org.apache.felix.log.jar").start();
- runtime.installBundle("bundles/jboss-osgi-common.jar").start();
+ runtime.installCompendium();
+ runtime.addCapability(new LogServiceCapability());
OSGiBundle bundle = runtime.getBundle("jboss-osgi-jaxb", null);
assertNull("Test bundle null", bundle);
@@ -117,9 +116,8 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
- runtime.installBundle("bundles/org.apache.felix.log.jar").start();
- runtime.installBundle("bundles/jboss-osgi-common.jar").start();
+ runtime.installCompendium();
+ runtime.addCapability(new LogServiceCapability());
OSGiBundle bundle = runtime.getBundle("jboss-osgi-xml-binding", null);
assertNull("Test bundle null", bundle);
@@ -141,9 +139,8 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
- runtime.installBundle("bundles/org.apache.felix.log.jar").start();
- runtime.installBundle("bundles/jboss-osgi-common.jar").start();
+ runtime.installCompendium();
+ runtime.addCapability(new LogServiceCapability());
OSGiBundle bundle = runtime.getBundle("jboss-osgi-jndi", null);
assertNull("Test bundle null", bundle);
@@ -165,9 +162,8 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
- runtime.installBundle("bundles/org.apache.felix.log.jar").start();
- runtime.installBundle("bundles/jboss-osgi-common.jar").start();
+ runtime.installCompendium();
+ runtime.addCapability(new LogServiceCapability());
OSGiBundle bundle = runtime.getBundle("jboss-osgi-jmx", null);
assertNull("Test bundle null", 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-09-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -50,7 +50,7 @@
OSGiRuntime runtime = getDefaultRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
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-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -58,7 +58,7 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
assertTrue("Bundle installed", bundleX.getState() <= Bundle.RESOLVED);
@@ -83,7 +83,7 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
assertTrue("Bundle installed", bundleX.getState() <= Bundle.RESOLVED);
@@ -112,7 +112,7 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
OSGiBundle bundleX = runtime.installBundle("jbosgi38-bundleX.jar");
assertTrue("Bundle installed", bundleX.getState() <= Bundle.RESOLVED);
@@ -145,7 +145,7 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
OSGiBundle bundleB = runtime.installBundle("jbosgi38-bundleB.jar");
assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
@@ -184,7 +184,7 @@
OSGiRuntime runtime = getEmbeddedRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
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-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41TestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -54,6 +54,7 @@
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-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -67,10 +67,13 @@
public static void setUpClass() throws Exception
{
runtime = new OSGiTestHelper().getDefaultRuntime();
+
+ runtime.installCompendium();
runtime.addCapability(new JNDICapability());
runtime.addCapability(new JMXCapability());
runtime.addCapability(new XMLBindingCapability());
runtime.addCapability(new MicrocontainerCapability());
+
}
@AfterClass
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-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelTestCase.java 2009-09-14 12:56:20 UTC (rev 93470)
@@ -45,7 +45,7 @@
OSGiRuntime runtime = getDefaultRuntime();
try
{
- runtime.installBundle("bundles/org.osgi.compendium.jar");
+ runtime.installCompendium();
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-14 12:41:39 UTC (rev 93469)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-09-14 12:56:20 UTC (rev 93470)
@@ -35,7 +35,7 @@
<!-- Properties -->
<properties>
<version.jboss.naming>5.0.1.GA</version.jboss.naming>
- <version.jbossas.client>5.0.1.GA</version.jbossas.client>
+ <version.jbossas.client>5.1.0.GA</version.jbossas.client>
</properties>
<!-- Dependencies -->
@@ -48,7 +48,7 @@
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
-
+
<!-- Bundle Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
@@ -135,7 +135,7 @@
<artifactId>jboss-osgi-jaxb</artifactId>
<scope>provided</scope>
</dependency>
-
+
<!-- Test Dependencies -->
<dependency>
<groupId>org.jboss.naming</groupId>
@@ -155,7 +155,7 @@
<scope>test</scope>
</dependency>
</dependencies>
-
+
<!-- Build -->
<build>
<testResources>
@@ -180,7 +180,7 @@
<name>!framework</name>
</property>
</activation>
-
+
<!-- default to jbossmc -->
<dependencies>
<dependency>
@@ -190,21 +190,13 @@
<scope>provided</scope>
</dependency>
</dependencies>
-
- <!-- default to felix
- <properties>
- <jboss.osgi.framework.properties>jboss-osgi-felix.properties</jboss.osgi.framework.properties>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-runtime-felix</artifactId>
- <version>${version.jboss.osgi.runtime.felix}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+
+ <!--
+ default to felix <properties> <jboss.osgi.framework.properties>jboss-osgi-felix.properties</jboss.osgi.framework.properties> </properties> <dependencies>
+ <dependency> <groupId>org.jboss.osgi.runtime</groupId> <artifactId>jboss-osgi-runtime-felix</artifactId> <version>${version.jboss.osgi.runtime.felix}</version>
+ <scope>provided</scope> </dependency> </dependencies>
-->
-
+
</profile>
<!--
@@ -401,25 +393,10 @@
<target.container.excludes>org/jboss/test/osgi/nothing-to-exclude</target.container.excludes>
</properties>
<dependencies>
- <!--
<dependency>
<groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <classifier>jmx-invoker-adaptor-client</classifier>
- <version>${version.jbossas.client}</version>
- <scope>test</scope>
- </dependency>
- -->
- <dependency>
- <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