Version 17

    The umbrella project builds the overall JBoss OSGi component and runs system tests suites over it. The Umbrella project contains the following system test suites:

    • example tests - these tests are provided as examples for users and are documented in the user's guide.
    • functional system tests
    • performance tests

    Additionally, the Umbrella contains the build system for the javadoc and the installer (see JBoss OSGi Building the Installer) the setup configuration for Hudson (see JBoss OSGi Hudson QA) and the TCK setup scripts (see JBoss OSGi Tck Setup).

     

    This page contains detailed information regarding the use of the umbrella project.

     

    Working with the JBoss OSGi Umbrella

    First, clone the umbrella project from Github. E.g. from git@github.com:jbosgi/jbosgi.git or from your own fork.

     

    After cloning initialize/update the submodules using the following commands:

    {code}git submodule init

    git submodule sync

    git submodule update{code}

     

    When you run

    {code}mvn install{code}

    in the umbrella root, it builds the umbrella and runs the system tests. If subcomponents aren't pulled in as git submodules they are built from released versions as listed in the root pom.xml.

     

    Pulling in a snapshot

    After making changes to a subcomponent (e.g. jbosgi-framework) you need to test these in the umbrella. For this the subcomponent needs be pulled in to the umbrella as a git submodule.

    In addition the root pom.xml in the umbrella needs to be updated to select the correct SNAPSHOT version.


    Adding a new submodule

    Add the submodule in the reactor subdirectory, e.g.

     

    {code}git submodule add git://github.com/jbosgi/jbosgi-framework.git reactor/jbosgi-framework{code}

    Updating an existing submodule

    If the subcomponent already exists in the umbrella as a submodule, then go into the submodule directory and change the selected version to the appropriate one:

     

    {code}cd reactor/jbosgi-framework

    git checkout master

    git pull origin

    {code}

     

    Don't forget to commit the umbrella if you want to persist your submodule changes.

     

    Running System Tests

    The System tests are under the testsuite directory in the umbella project. The followin g system tests currently exist:

    • Examples
    • Functional
    • Performance

    The Examples tests are described in the user documentation.

     

    The system tests can be run in embedded mode, and also with JBoss OSGi running inside AS as well as with a standalone remote JBoss OSGi runtime.

     

    Embedded System Tests

    The embedded system tests run the JBoss OSGi Framework embedded with the test cases. This means that an instance of the framework is created as part of the JUnit test cases.

     

    When running

    {code}mvn test{code}

    from the umbrella root or from the testsuite directory, the system tests are run in embedded more.

    Remote System Tests - AS7 remote

    1. For this you need an AS7 kit. This can be downloaded from the AS7 downloads page or built from source by building https://github.com/jbossas/jboss-as.

     

    2. Build and run the installer as described in JBoss OSGi Building the Installer. Make sure to install the AS7 integration to the .../build/target/jboss-7.0.0 directory as built in the AS7 clone or to wherever AS7 was installed.

     

    AS7 already contains JBoss OSGi integration, but running the installer adds a number of bundles to the AS7 deployments folder which are used as part of the system tests. You can check that it worked by looking at the standalone/deployments folder in AS7 where you will find bundles such as jbosgi-blueprint.jar, jbosgi-webconsole.jar and more.

     

    3. When the installer is finished, start AS7 by running

    {code}bin/standalone.sh{code}

    you will see that the OSGi bundles put there by the installer are being started, from output such as:

    {code}16:46:44,960 INFO  [org.jboss.osgi.framework.bundle.HostBundle] (pool-1-thread-1)

    Bundle started: jboss-osgi-common-core:2.2.17.SP1

    16:46:45,026 INFO  [org.jboss.osgi.framework.bundle.HostBundle] (pool-1-thread-1)

    Bundle started: jboss-osgi-webapp:1.0.1{code}

     

    4. Now you can start the system tests, make sure to specify the target.container propery for running AS7:

    {code}mvn test -Dtarget.container=jboss70x{code}

     

    Remote System Tests - JBoss OSGi standalone

    The system tests can also be run with a JBoss OSGi framework running as a standalone process.

     

    1. Build and run the installer as described in JBoss OSGi Building the Installer.

     

    2. Start the OSGi standalone runtime by running

    {code}runtime/bin/run.sh -c all{code}

    The runtime will now start up, you will see output such as:

    {code}17:00:33,991 INFO  [HostBundle] Bundle started: org.apache.felix.configadmin:1.2.8

    17:00:34,058 INFO  [JNPServer] JNDI started: JNP=localhost:1099, RMI=localhost:1098

    17:00:34,061 INFO  [HostBundle] Bundle started: jboss-osgi-jndi:1.0.4

    17:00:34,073 INFO  [DeploymentScannerImpl] JBossOSGi Runtime started in 0.567000sec{code}

     

    3. Start the system tests, specify runtime as the target container:

    {code}mvn test -Dtarget.container=runtime{code}

    Running Performance Tests

    TODO