[jboss-osgi-commits] JBoss-OSGI SVN: r90467 - in projects/jboss-osgi/trunk: blueprint/testsuite and 6 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Fri Jun 19 06:02:07 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-06-19 06:02:07 -0400 (Fri, 19 Jun 2009)
New Revision: 90467
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/
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/bundle/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundle.bnd
Removed:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI39TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleX/
Modified:
projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
Log:
Disable BP from AS integration
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-06-19 09:59:50 UTC (rev 90466)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-06-19 10:02:07 UTC (rev 90467)
@@ -142,6 +142,127 @@
<!-- Profiles -->
<profiles>
+
+ <!--
+ Name: framework-equinox
+ Descr: Setup for Equinox framework integration testing
+ -->
+ <profile>
+ <id>framework-equinox</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>equinox</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: framework-knopflerfish
+ Descr: Setup for Knopflerfish framework integration testing
+ -->
+ <profile>
+ <id>framework-knopflerfish</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ <value>knopflerfish</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: jboss501
+ Descr: Setup for jboss501 integration testing
+ -->
+ <profile>
+ <id>jboss501</id>
+ <activation>
+ <property>
+ <name>target.container</name>
+ <value>jboss501</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: jboss510
+ Descr: Setup for jboss510 integration testing
+ -->
+ <profile>
+ <id>jboss510</id>
+ <activation>
+ <property>
+ <name>target.container</name>
+ <value>jboss510</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: jboss600
+ Descr: Setup for jboss600 integration testing
+ -->
+ <profile>
+ <id>jboss600</id>
+ <activation>
+ <property>
+ <name>target.container</name>
+ <value>jboss600</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
</project>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-06-19 09:59:50 UTC (rev 90466)
+++ projects/jboss-osgi/trunk/pom.xml 2009-06-19 10:02:07 UTC (rev 90467)
@@ -54,7 +54,7 @@
<version.jboss.osgi.microcontainer>1.0.0-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.jboss.osgi.remotelog>1.0.0.Beta2</version.jboss.osgi.remotelog>
<version.jboss.osgi.runtime.equinox>1.0.0.Beta2</version.jboss.osgi.runtime.equinox>
- <version.jboss.osgi.runtime.felix>1.0.0.Beta2</version.jboss.osgi.runtime.felix>
+ <version.jboss.osgi.runtime.felix>1.0.0-SNAPSHOT</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.knopflerfish>1.0.0.Beta2</version.jboss.osgi.runtime.knopflerfish>
<version.jboss.osgi.spi>1.0.0-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.webconsole>1.0.0.Beta2</version.jboss.osgi.webconsole>
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-06-19 09:59:50 UTC (rev 90466)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/antrun-test-jars.xml 2009-06-19 10:02:07 UTC (rev 90467)
@@ -78,6 +78,9 @@
<!-- jbosgi41 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi41-bundleA.jar" files="${tests.resources.dir}/jbosgi41/jbosgi41-bundleA.bnd" />
+ <!-- jbosgi108 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi108-bundle.jar" files="${tests.resources.dir}/jbosgi108/jbosgi108-bundle.bnd" />
+
<!-- startlevel -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/service/startlevel.jar" files="${tests.resources.dir}/service/startlevel/startlevel.bnd" />
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108 (from rev 90465, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39)
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java (from rev 90465, 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/jbosgi108/OSGI108TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI108TestCase.java 2009-06-19 10:02:07 UTC (rev 90467)
@@ -0,0 +1,71 @@
+/*
+ * 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.jbosgi108;
+
+//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
+
+import org.jboss.osgi.spi.testing.OSGiBundle;
+import org.jboss.osgi.spi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.OSGiTestHelper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.BundleException;
+
+/**
+ * [JBOSGI-108] Investigate statics on PackageAdmin.refresh
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-108
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 19-Jun-2009
+ */
+public class OSGI108TestCase
+{
+ private static OSGiRuntime runtime;
+
+ @BeforeClass
+ public static void beforeClass() throws BundleException
+ {
+ runtime = new OSGiTestHelper().getDefaultRuntime();
+
+ OSGiBundle bundle = runtime.installBundle("jbosgi108-bundle.jar");
+ bundle.start();
+ }
+
+ @AfterClass
+ public static void afterClass() throws BundleException
+ {
+ if (runtime != null)
+ runtime.shutdown();
+ }
+
+ @Test
+ public void testRefresh() throws Exception
+ {
+ OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
+ packageAdmin.refreshPackages(null);
+
+ Thread.sleep(1000);
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI39TestCase.java
===================================================================
--- 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)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGI39TestCase.java 2009-06-19 10:02:07 UTC (rev 90467)
@@ -1,183 +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.jbosgi39;
-
-//$Id: OSGI39TestCase.java 87103 2009-04-09 22:18:31Z thomas.diesler at jboss.com $
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.jboss.osgi.spi.testing.OSGiBundle;
-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;
-
-/**
- * [JBOSGI-39] Bundle gets wired to an already uninstalled bundle
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-39
- *
- * Bundle B depends on bundle X.
- *
- * B ---> X
- *
- * @author thomas.diesler at jboss.com
- * @since 04-Mar-2009
- */
-public class OSGI39TestCase extends OSGiTest
-{
- @Test
- public void testVerifyUnresolved() throws Exception
- {
- OSGiRuntime runtime = getDefaultRuntime();
- try
- {
- OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- try
- {
- bundleB.start();
- fail("Unresolved constraint expected");
- }
- catch (BundleException ex)
- {
- // expected
- }
-
- OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
-
- bundleB.start();
-
- assertTrue("Bundle resolved", + Bundle.RESOLVED == bundleX.getState() || Bundle.ACTIVE == bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- bundleB.uninstall();
- bundleX.uninstall();
- }
- finally
- {
- runtime.shutdown();
- }
- }
-
- /*
- * 4.3.11 Uninstalling Bundles
- *
- * Once this method returns, the state of the OSGi Service Platform must be the same as if the bundle had never been installed, unless:
- *
- * - The uninstalled bundle has exported any packages (via its Export-Package manifest header)
- * - The uninstalled bundle was selected by the Framework as the exporter of these packages.
- *
- * If none of the old exports are used, then the old exports must be removed. Otherwise, all old exports must remain available
- * for existing bundles and future resolves until the refreshPackages method is called or the Framework is restarted.
- */
- @Test
- public void testWiringToUninstalled() throws Exception
- {
- OSGiRuntime runtime = getDefaultRuntime();
- try
- {
- OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
- OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
- bundleB.start();
-
- assertTrue("Bundle resolved", + Bundle.RESOLVED == bundleX.getState() || Bundle.ACTIVE == bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- // Uninstall X before B
- bundleX.uninstall();
- bundleB.uninstall();
-
- // Install B without X
- bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
- bundleB.start();
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- bundleB.uninstall();
- }
- finally
- {
- runtime.shutdown();
- }
- }
-
- @Test
- @Ignore(value="[JBOSGI-107] MC service cannot be refreshed")
- public void testWiringToUninstalledPackageAdmin() throws Exception
- {
- OSGiRuntime runtime = getDefaultRuntime();
- try
- {
- OSGiBundle bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
- OSGiBundle bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
- bundleB.start();
-
- assertTrue("Bundle resolved", + Bundle.RESOLVED == bundleX.getState() || Bundle.ACTIVE == bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- // Uninstall X before B
- bundleX.uninstall();
- bundleB.uninstall();
-
- // Forces the update (replacement) or removal of packages exported by the specified bundles.
- OSGiPackageAdmin packAdmin = runtime.getPackageAdmin();
- packAdmin.refreshPackages(null);
-
- // Install B without X
- bundleB = runtime.installBundle("jbosgi39-bundleB.jar");
-
- try
- {
- bundleB.start();
- fail("Unresolved constraint expected");
- }
- catch (BundleException ex)
- {
- // expected
- }
-
- bundleX = runtime.installBundle("jbosgi39-bundleX.jar");
-
- bundleB.start();
-
- assertTrue("Bundle resolved", + Bundle.RESOLVED == bundleX.getState() || Bundle.ACTIVE == bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- bundleB.uninstall();
- bundleX.uninstall();
- }
- finally
- {
- runtime.shutdown();
- }
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundle/ServiceActivator.java (from rev 90465, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundle/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundle/ServiceActivator.java 2009-06-19 10:02:07 UTC (rev 90467)
@@ -0,0 +1,62 @@
+/*
+ * 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.jbosgi108.bundle;
+
+//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler at jboss.com $
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class ServiceActivator implements BundleActivator
+{
+ private static List<String> messages = new ArrayList<String>();
+
+ public void start(BundleContext context)
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ String msg = "start with " + cl + " - hashCode: " + cl.hashCode();
+ messages.add(msg);
+ report(messages);
+ }
+
+ public void stop(BundleContext context)
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ String msg = "stop with " + cl + " - hashCode: " + cl.hashCode();
+ messages.add(msg);
+ report(messages);
+ }
+
+ private void report(List<String> messages)
+ {
+ System.out.println(">>>>>>>>>>>>");
+ for (String aux : messages)
+ {
+ System.out.println(aux);
+ }
+ System.out.println("<<<<<<<<<<<");
+ }
+
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundle.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundle.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundle.bnd 2009-06-19 10:02:07 UTC (rev 90467)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/jbosgi108-bundle.jar src/test/resources/jbosgi108/bundle.bnd
+
+Bundle-SymbolicName: jbosgi108-bundle
+Bundle-Activator: org.jboss.test.osgi.jbosgi108.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.jbosgi108.bundle
+
More information about the jboss-osgi-commits
mailing list