JBoss-OSGI SVN: r87103 - in projects/jboss-osgi/trunk: runtime/felix/src/test/java/org/jboss/test/osgi/felix and 12 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-09 18:18:31 -0400 (Thu, 09 Apr 2009)
New Revision: 87103
Added:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subA/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subA/PojoA.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subB/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subB/PojoB.java
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-subA.bnd
Removed:
projects/jboss-osgi/trunk/runtime/felix/src/test/java/org/jboss/test/osgi/felix/microcontainer/
projects/jboss-osgi/trunk/runtime/felix/src/test/resources/microcontainer/
Modified:
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
Log:
[JBOSGI-37] Add test skeleton
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-04-09 22:17:47 UTC (rev 87102)
+++ projects/jboss-osgi/trunk/pom.xml 2009-04-09 22:18:31 UTC (rev 87103)
@@ -35,7 +35,7 @@
<!-- Properties -->
<properties>
- <version.aqute.bnd>0.0.249</version.aqute.bnd>
+ <version.aqute.bnd>0.0.315</version.aqute.bnd>
<version.equinox>3.4.2</version.equinox>
<version.felix.configadmin>1.0.10</version.felix.configadmin>
<version.felix.framework>1.4.1</version.felix.framework>
@@ -196,7 +196,7 @@
<artifactId>org.eclipse.osgi.services</artifactId>
<version>${version.equinox}</version>
</dependency>
-
+
<!-- Felix Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
@@ -250,7 +250,7 @@
<artifactId>org.knopflerfish.framework</artifactId>
<version>${version.knopflerfish}</version>
</dependency>
-
+
<!-- Test Dependencies -->
<dependency>
<groupId>org.jboss</groupId>
@@ -268,7 +268,7 @@
</dependencyManagement>
<build>
-
+
<!-- Plugins -->
<plugins>
<plugin>
@@ -319,6 +319,10 @@
<!-- Repositories -->
<repositories>
<repository>
+ <id>aQute</id>
+ <url>http://www.aQute.biz/repo</url>
+ </repository>
+ <repository>
<id>repository.jboss.org</id>
<name>JBoss Repository</name>
<layout>default</layout>
@@ -351,7 +355,7 @@
</snapshots>
</pluginRepository>
</pluginRepositories>
-
+
<!-- Reporting -->
<reporting>
<plugins>
Modified: projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-09 22:17:47 UTC (rev 87102)
+++ projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-09 22:18:31 UTC (rev 87103)
@@ -54,11 +54,21 @@
</fileset>
</jar>
+ <!-- jbosgi37 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jbosgi37-subB.jar">
+ <fileset dir="${tests.classes.dir}">
+ <include name="org/jboss/test/osgi/jbosgi37/subB/PojoB.class" />
+ </fileset>
+ </jar>
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-subA.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-subA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-bundleA.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-bundleA.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi37-bundleB.jar" files="${tests.resources.dir}/jbosgi37/jbosgi37-bundleB.bnd" />
+
<!-- jbosgi38 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleA.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleA.bnd" />
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleB.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleB.bnd" />
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleX.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleX.bnd" />
-
+
<!-- jbosgi39 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleB.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleB.bnd" />
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleX.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleX.bnd" />
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,41 @@
+/*
+ * 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.jbosgi37;
+
+//$Id$
+
+import org.jboss.osgi.spi.junit.OSGiTest;
+
+/**
+ * [JBOSGI-37] Prevent creation of deployment unit for nested jars
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-37
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 09-Apr-2009
+ */
+public class OSGI37TestCase extends OSGiTest
+{
+ public void testServiceA() throws Exception
+ {
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/OSGI37TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,39 @@
+/*
+ * 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.jbosgi37.bundleA;
+
+//$Id$
+
+import org.jboss.test.osgi.jbosgi37.subA.PojoA;
+import org.osgi.framework.BundleContext;
+
+/**
+ * ServiceA has a dependecy on PojoA
+ */
+public class ServiceA
+{
+ ServiceA(BundleContext context)
+ {
+ PojoA pojo = new PojoA(context.getBundle().getSymbolicName());
+ System.out.println(pojo);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,48 @@
+/*
+ * 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.jbosgi37.bundleA;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class ServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ public void start(BundleContext context)
+ {
+ ServiceA service = new ServiceA(context);
+ registration = context.registerService(ServiceA.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,48 @@
+/*
+ * 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.jbosgi37.bundleB;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class ServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ public void start(BundleContext context)
+ {
+ ServiceB service = new ServiceB(context);
+ registration = context.registerService(ServiceB.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,39 @@
+/*
+ * 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.jbosgi37.bundleB;
+
+//$Id$
+
+import org.jboss.test.osgi.jbosgi37.subB.PojoB;
+import org.osgi.framework.BundleContext;
+
+/**
+ * ServiceB has a dependecy on PojoB
+ */
+public class ServiceB
+{
+ ServiceB(BundleContext context)
+ {
+ PojoB pojo = new PojoB(context.getBundle().getSymbolicName());
+ System.out.println(pojo);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subA/PojoA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subA/PojoA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subA/PojoA.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,41 @@
+/*
+ * 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.jbosgi37.subA;
+
+
+//$Id$
+
+public class PojoA
+{
+ private String message;
+
+ public PojoA(String message)
+ {
+ this.message = message;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "[" + message + "]";
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subA/PojoA.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subB/PojoB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subB/PojoB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subB/PojoB.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,41 @@
+/*
+ * 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.jbosgi37.subB;
+
+
+//$Id$
+
+public class PojoB
+{
+ private String message;
+
+ public PojoB(String message)
+ {
+ this.message = message;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "[" + message + "]";
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi37/subB/PojoB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java 2009-04-09 22:17:47 UTC (rev 87102)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -25,7 +25,7 @@
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.jboss.osgi.spi.junit.OSGiTest;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -43,7 +43,7 @@
* @author thomas.diesler(a)jboss.com
* @since 02-Mar-2009
*/
-public class OSGI38TestCase extends IntegrationTest
+public class OSGI38TestCase extends OSGiTest
{
/*
* Install/Start the common bundle
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java 2009-04-09 22:17:47 UTC (rev 87102)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java 2009-04-09 22:18:31 UTC (rev 87103)
@@ -24,7 +24,7 @@
//$Id$
import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.jboss.osgi.spi.junit.OSGiTest;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -43,7 +43,7 @@
* @author thomas.diesler(a)jboss.com
* @since 04-Mar-2009
*/
-public class OSGI39TestCase extends IntegrationTest
+public class OSGI39TestCase extends OSGiTest
{
public void testVerifyUnresolved() throws Exception
{
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,10 @@
+# bnd build -classpath target/test-classes -output target/test-libs/jbosgi37-bundleA.jar src/test/resources/jbosgi37/jbosgi37-bundleA.bnd
+
+Bundle-SymbolicName: jbosgi37-bundleA
+Bundle-Activator: org.jboss.test.osgi.jbosgi37.bundleA.ServiceActivator
+Export-Package: org.jboss.test.osgi.jbosgi37.bundleA
+
+Include-Resource: ../../../target/test-libs/jbosgi37-subA.jar
+Bundle-ClassPath: .,jbosgi37-subA.jar
+
+-removeheaders: Include-Resource
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,10 @@
+# bnd build -classpath target/test-classes -output target/test-libs/jbosgi37-bundleB.jar src/test/resources/jbosgi37/jbosgi37-bundleB.bnd
+
+Bundle-SymbolicName: jbosgi37-bundleB
+Bundle-Activator: org.jboss.test.osgi.jbosgi37.bundleB.ServiceActivator
+Export-Package: org.jboss.test.osgi.jbosgi37.bundleB
+
+Include-Resource: ../../../target/test-libs/jbosgi37-subB.jar
+Bundle-ClassPath: .,jbosgi37-subB.jar
+
+-removeheaders: Include-Resource
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-subA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-subA.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi37/jbosgi37-subA.bnd 2009-04-09 22:18:31 UTC (rev 87103)
@@ -0,0 +1,5 @@
+# bnd build -classpath target/test-classes -output target/test-libs/jbosgi37-subA.jar src/test/resources/jbosgi37/jbosgi37-subA.bnd
+
+Bundle-SymbolicName: jbosgi37-subA
+Export-Package: org.jboss.test.osgi.jbosgi37.subA
+
16 years, 8 months
JBoss-OSGI SVN: r87068 - projects/jboss-osgi/trunk/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-09 08:19:11 -0400 (Thu, 09 Apr 2009)
New Revision: 87068
Modified:
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
[JBOSGI-40] Make sure AdminPermission is loaded from felix framework jar
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-09 12:13:47 UTC (rev 87067)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-09 12:19:11 UTC (rev 87068)
@@ -17,6 +17,7 @@
<!-- Properties -->
<properties>
+ <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
</properties>
<!-- Dependencies -->
@@ -32,11 +33,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-aop-mc-int</artifactId>
</dependency>
16 years, 8 months
JBoss-OSGI SVN: r87065 - projects/jboss-osgi/trunk/build/hudson.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-09 07:17:23 -0400 (Thu, 09 Apr 2009)
New Revision: 87065
Modified:
projects/jboss-osgi/trunk/build/hudson/build.xml
Log:
Fix hudson-setup
Modified: projects/jboss-osgi/trunk/build/hudson/build.xml
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/build.xml 2009-04-09 11:08:56 UTC (rev 87064)
+++ projects/jboss-osgi/trunk/build/hudson/build.xml 2009-04-09 11:17:23 UTC (rev 87065)
@@ -22,11 +22,12 @@
<!-- ================================================================== -->
<macrodef name="copyjobs">
<sequential>
- <copyjob index="0" prefix="${hudson.job.prefix}" job="Container-Matrix"/>
- <copyjob index="1" prefix="${hudson.job.prefix}" job="Container-JDK1.5"/>
- <copyjob index="2" prefix="${hudson.job.prefix}" job="Container-JDK1.6"/>
- <copyjob index="3" prefix="" job="JBoss-5.1.0"/>
- <copyjob index="4" prefix="" job="JBoss-6.0.0"/>
+ <copyjob index="0" prefix="" job="JBoss-5.1.0"/>
+ <copyjob index="1" prefix="" job="JBoss-6.0.0"/>
+ <copyjob index="2" prefix="${hudson.job.prefix}" job="jbossosgi-embedded"/>
+ <copyjob index="3" prefix="${hudson.job.prefix}" job="jbossosgi-jdk15"/>
+ <copyjob index="4" prefix="${hudson.job.prefix}" job="jbossosgi-jdk16"/>
+ <copyjob index="5" prefix="${hudson.job.prefix}" job="jbossosgi-matrix"/>
</sequential>
</macrodef>
16 years, 8 months
JBoss-OSGI SVN: r87064 - in projects/jboss-osgi/trunk: build/hudson/hudson-home/jobs/JBoss-6.0.0 and 14 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-09 07:08:56 -0400 (Thu, 09 Apr 2009)
New Revision: 87064
Added:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceB.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleX/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleX/SomePojo.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/HttpServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointServlet.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/Foo.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/FooMBean.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleX.bnd
Removed:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39EmbeddedTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointServlet.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/junit/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/Foo.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/FooMBean.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanTestService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/junit/
Modified:
projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-5.1.0/config.xml
projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-6.0.0/config.xml
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/http-service.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd
Log:
Cleanup testsuite
Modified: projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-5.1.0/config.xml
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-5.1.0/config.xml 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-5.1.0/config.xml 2009-04-09 11:08:56 UTC (rev 87064)
@@ -10,6 +10,10 @@
<remote>https://svn.jboss.org/repos/jbossas/branches/Branch_5_x</remote>
<local>jbossas</local>
</hudson.scm.SubversionSCM_-ModuleLocation>
+ <hudson.scm.SubversionSCM_-ModuleLocation>
+ <remote>@hudson.osgi.url@</remote>
+ <local>jboss-osgi</local>
+ </hudson.scm.SubversionSCM_-ModuleLocation>
</locations>
<useUpdate>true</useUpdate>
<browser class="hudson.scm.browsers.FishEyeSVN">
@@ -25,18 +29,43 @@
<builders>
<hudson.tasks.Shell>
<command>
+HUDSONDIR=$WORKSPACE/jboss-osgi//build/hudson
-JBOSS_VERSION=jboss-5.1.0.Beta1
+JBOSS_VERSION=jboss-5.1.0.CR1
+
+JBOSS_HOME=$WORKSPACE/jbossas/build/output/$JBOSS_VERSION
JBOSS_ZIP=$HUDSON_HOME/../jboss/$JBOSS_VERSION.zip
+JBOSS_BINDADDR=(a)jboss.bind.address@
+#
# Build JBoss
+#
cd jbossas
build/build.sh clean main
-# Remove existing jboss.zip
+#
+# Start JBossAS
+#
+$HUDSONDIR/jboss/bin/jboss.sh $JBOSS_HOME start $JBOSS_BINDADDR
+
+#
+# Was it successfully started?
+#
+$HUDSONDIR/jboss/bin/http-spider.sh $JBOSS_BINDADDR:8080 $WORKSPACE
+if [ -e $WORKSPACE/spider.failed ]; then
+ tail -n 200 $JBOSS_HOME/server/default/log/server.log
+ $HUDSONDIR/jboss/bin/jboss.sh $JBOSS_HOME stop $JBOSS_BINDADDR
+ exit 1
+fi
+
+#
+# Remove existing jboss.zip
+#
rm -f $JBOSS_ZIP
-# Create new jboss.zip
+#
+# Create new jboss.zip
+#
cd build/output
zip -r $JBOSS_ZIP $JBOSS_VERSION/*
Modified: projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-6.0.0/config.xml
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-6.0.0/config.xml 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/JBoss-6.0.0/config.xml 2009-04-09 11:08:56 UTC (rev 87064)
@@ -10,6 +10,10 @@
<remote>https://svn.jboss.org/repos/jbossas/trunk</remote>
<local>jbossas</local>
</hudson.scm.SubversionSCM_-ModuleLocation>
+ <hudson.scm.SubversionSCM_-ModuleLocation>
+ <remote>@hudson.osgi.url@</remote>
+ <local>jboss-osgi</local>
+ </hudson.scm.SubversionSCM_-ModuleLocation>
</locations>
<useUpdate>true</useUpdate>
<browser class="hudson.scm.browsers.FishEyeSVN">
@@ -25,18 +29,43 @@
<builders>
<hudson.tasks.Shell>
<command>
+HUDSONDIR=$WORKSPACE/jboss-osgi//build/hudson
JBOSS_VERSION=jboss-6.0.0.Alpha1
+
+JBOSS_HOME=$WORKSPACE/jbossas/build/output/$JBOSS_VERSION
JBOSS_ZIP=$HUDSON_HOME/../jboss/$JBOSS_VERSION.zip
+JBOSS_BINDADDR=(a)jboss.bind.address@
+#
# Build JBoss
+#
cd jbossas
build/build.sh clean main
-# Remove existing jboss.zip
+#
+# Start JBossAS
+#
+$HUDSONDIR/jboss/bin/jboss.sh $JBOSS_HOME start $JBOSS_BINDADDR
+
+#
+# Was it successfully started?
+#
+$HUDSONDIR/jboss/bin/http-spider.sh $JBOSS_BINDADDR:8080 $WORKSPACE
+if [ -e $WORKSPACE/spider.failed ]; then
+ tail -n 200 $JBOSS_HOME/server/default/log/server.log
+ $HUDSONDIR/jboss/bin/jboss.sh $JBOSS_HOME stop $JBOSS_BINDADDR
+ exit 1
+fi
+
+#
+# Remove existing jboss.zip
+#
rm -f $JBOSS_ZIP
-# Create new jboss.zip
+#
+# Create new jboss.zip
+#
cd build/output
zip -r $JBOSS_ZIP $JBOSS_VERSION/*
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-09 11:08:56 UTC (rev 87064)
@@ -196,10 +196,6 @@
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
- <exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
- <exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
- <!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
- <exclude>org/jboss/test/osgi/jbosgi39/*TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -233,10 +229,6 @@
<configuration>
<argLine>${surefire.security.args}</argLine>
<excludes>
- <!-- [JBOSGI-40] Cannot run embedded tests with SecurityManager -->
- <exclude>org/jboss/test/osgi/**/*EmbeddedTestCase.java</exclude>
- <!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
- <exclude>org/jboss/test/osgi/jbosgi39/*TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-09 11:08:56 UTC (rev 87064)
@@ -84,7 +84,7 @@
<!--
Name: framework-any
- Descr: Create the testsuite.zip and skip tests if there is a framework specified
+ Descr: Create the testsuite.zip and skip tests
-->
<profile>
<id>framework-any</id>
@@ -191,10 +191,6 @@
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
- <exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
- <exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
- <!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
- <exclude>org/jboss/test/osgi/jbosgi39/*TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -228,10 +224,6 @@
<configuration>
<argLine>${surefire.security.args}</argLine>
<excludes>
- <!-- [JBOSGI-40] Cannot run embedded tests with SecurityManager -->
- <exclude>org/jboss/test/osgi/**/*EmbeddedTestCase.java</exclude>
- <!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
- <exclude>org/jboss/test/osgi/jbosgi39/*TestCase.java</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-09 11:08:56 UTC (rev 87064)
@@ -59,6 +59,10 @@
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleB.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleB.bnd" />
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi38-bundleX.jar" files="${tests.resources.dir}/jbosgi38/jbosgi38-bundleX.bnd" />
+ <!-- jbosgi39 -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleB.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleB.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi39-bundleX.jar" files="${tests.resources.dir}/jbosgi39/jbosgi39-bundleX.bnd" />
+
<!-- jbosgi41 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi41-bundleA.jar" files="${tests.resources.dir}/jbosgi41/jbosgi41-bundleA.bnd" />
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39EmbeddedTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39EmbeddedTestCase.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39EmbeddedTestCase.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,97 +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$
-
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-/**
- * [JBOSGI-39] Bundle undeploy does not clean up properly
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-39
- *
- * Bundle B depends on bundle X.
- *
- * B ---> X
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Mar-2009
- */
-public class OSGI39EmbeddedTestCase extends IntegrationTest
-{
- static OSGiBootstrapProvider bootProvider;
-
- @Override
- protected OSGiBootstrapProvider getBootstrapProvider()
- {
- if (bootProvider == null)
- bootProvider = createBootstrapProvider();
-
- return bootProvider;
- }
-
- public void testFirstRun() throws Exception
- {
- installBBeforeX();
- }
-
- public void testSecondRun() throws Exception
- {
- installBBeforeX();
- }
-
- private void installBBeforeX() throws Exception
- {
- OSGiFramework framework = getBootstrapProvider().getFramework();
- BundleContext sysContext = framework.getSystemBundleContext();
-
- Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- try
- {
- bundleB.start();
- fail("Unresolved constraint expected");
- }
- catch (BundleException ex)
- {
- // expected
- }
-
- Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
-
- bundleB.start();
-
- assertEquals("Bundle resolved", Bundle.RESOLVED, bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- // Uninstall X before B
- bundleX.uninstall();
- bundleB.uninstall();
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -26,9 +26,10 @@
import org.jboss.osgi.spi.framework.RemoteBundle;
import org.jboss.osgi.spi.junit.IntegrationTest;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
/**
- * [JBOSGI-39] Bundle undeploy does not clean up properly
+ * [JBOSGI-39] Bundle gets wired to an already uninstalled bundle
*
* https://jira.jboss.org/jira/browse/JBOSGI-39
*
@@ -41,29 +42,63 @@
*/
public class OSGI39RemoteTestCase extends IntegrationTest
{
- public void testFirstRun() throws Exception
+ public void testVerifyUnresolved() throws Exception
{
- installBBeforeX();
+ RemoteBundle bundleB = deployBundle("jbosgi39-bundleB");
+
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
+
+ RemoteBundle bundleX = deployBundle("jbosgi39-bundleX");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ undeployBundle("jbosgi39-bundleB");
+ undeployBundle("jbosgi39-bundleX");
}
- public void testSecondRun() throws Exception
+ /*
+ * 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.
+ */
+ public void testWiringToUninstalled() throws Exception
{
- installBBeforeX();
- }
+ RemoteBundle bundleX = deployBundle("jbosgi39-bundleX");
+ RemoteBundle bundleB = deployBundle("jbosgi39-bundleB");
+
+ bundleB.start();
+
+ assertEquals("Bundle resolved", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- private void installBBeforeX() throws Exception
- {
- RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+ // Undeploy X before B
+ undeployBundle("jbosgi39-bundleX");
+ undeployBundle("jbosgi39-bundleB");
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+ // Install B without X
+ bundleB = deployBundle("jbosgi39-bundleB");
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+ bundleB.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- // Undeploy X before B
- undeployBundle("jbosgi38-bundleX");
- undeployBundle("jbosgi38-bundleB");
+
+ undeployBundle("jbosgi39-bundleB");
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39EmbeddedTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39TestCase.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,160 @@
+/*
+ * 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$
+
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * [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(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public class OSGI39TestCase extends IntegrationTest
+{
+ public void testVerifyUnresolved() throws Exception
+ {
+ OSGiFramework framework = getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
+
+ Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleX.jar").toExternalForm());
+
+ bundleB.start();
+
+ assertEquals("Bundle resolved", Bundle.RESOLVED, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ bundleB.uninstall();
+ bundleX.uninstall();
+ }
+
+ /*
+ * 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.
+ */
+ public void testWiringToUninstalled() throws Exception
+ {
+ OSGiFramework framework = getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleX.jar").toExternalForm());
+ Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+
+ bundleB.start();
+
+ assertEquals("Bundle resolved", Bundle.RESOLVED, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ // Uninstall X before B
+ bundleX.uninstall();
+ bundleB.uninstall();
+
+ // Install B without X
+ bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+
+ bundleB.start();
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ bundleB.uninstall();
+ }
+
+ public void testWiringToUninstalledPackageAdmin() throws Exception
+ {
+ OSGiFramework framework = getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleX.jar").toExternalForm());
+ Bundle bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+
+ bundleB.start();
+
+ assertEquals("Bundle resolved", Bundle.RESOLVED, 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.
+ ServiceReference sref = sysContext.getServiceReference(PackageAdmin.class.getName());
+ PackageAdmin packAdmin = (PackageAdmin)sysContext.getService(sref);
+ packAdmin.refreshPackages(null);
+
+ // Install B without X
+ bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
+
+ bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi39-bundleX.jar").toExternalForm());
+
+ bundleB.start();
+
+ assertEquals("Bundle resolved", Bundle.RESOLVED, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ bundleB.uninstall();
+ bundleX.uninstall();
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,48 @@
+/*
+ * 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.bundleB;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class ServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ public void start(BundleContext context)
+ {
+ ServiceB service = new ServiceB();
+ registration = context.registerService(ServiceB.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceB.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,40 @@
+/*
+ * 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.bundleB;
+
+//$Id$
+
+import org.jboss.test.osgi.jbosgi39.bundleX.SomePojo;
+
+/**
+ * ServiceA has a dependency on ServiceB, both have a dependency on SomePojo
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 02-Mar-2009
+ */
+public class ServiceB
+{
+ public String doStuffInB(SomePojo obj)
+ {
+ return obj.toString();
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleX/SomePojo.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleX/SomePojo.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleX/SomePojo.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,41 @@
+/*
+ * 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.bundleX;
+
+
+//$Id$
+
+public class SomePojo
+{
+ private String message;
+
+ public SomePojo(String message)
+ {
+ this.message = message;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "[" + message + "]";
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/bundleX/SomePojo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointService.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointService.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,99 +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.service.http;
-
-//$Id$
-
-import java.util.Properties;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.http.HttpService;
-
-/**
- * A service that creates an Http context through the HttpService
- *
- * @author thomas.diesler(a)jboss.com
- * @since 23-Jan-2009
- */
-public class EndpointService implements ServiceListener
-{
- private BundleContext context;
-
- public EndpointService(BundleContext context)
- {
- this.context = context;
- context.addServiceListener(this);
- }
-
- private void registerService()
- {
- try
- {
- HttpService httpService = getHttpService();
-
- Properties initParams = new Properties();
- initParams.setProperty("initProp", "SomeValue");
- httpService.registerServlet("/servlet", new EndpointServlet(context), initParams, null);
- httpService.registerResources("/file", "/res", null);
- }
- catch (Exception ex)
- {
- throw new RuntimeException("Cannot register context", ex);
- }
- }
-
- private void unregisterService()
- {
- HttpService httpService = getHttpService();
- httpService.unregister("/servlet");
- httpService.unregister("/file");
- context.removeServiceListener(this);
- }
-
- private HttpService getHttpService()
- {
- ServiceReference sref = context.getServiceReference(HttpService.class.getName());
- if (sref == null)
- throw new IllegalStateException("HttpService not registered");
-
- return (HttpService)context.getService(sref);
- }
-
- public void serviceChanged(ServiceEvent event)
- {
- Object service = context.getService(event.getServiceReference());
- if (service == this)
- {
- if (event.getType() == ServiceEvent.REGISTERED)
- {
- registerService();
- }
- else if (event.getType() == ServiceEvent.UNREGISTERING)
- {
- unregisterService();
- }
- }
- }
-}
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointServlet.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointServlet.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointServlet.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,83 +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.service.http;
-
-//$Id$
-
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.service.startlevel.StartLevel;
-import org.osgi.util.tracker.ServiceTracker;
-
-@SuppressWarnings("serial")
-public class EndpointServlet extends HttpServlet
-{
- private BundleContext context;
-
- // This hides the default ctor and verifies that this instance is used
- public EndpointServlet(BundleContext context)
- {
- this.context = context;
- }
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
- {
- PrintWriter out = res.getWriter();
-
- String testParam = req.getParameter("test");
- if ("plain".equals(testParam))
- {
- out.println("Hello from Servlet");
- }
- else if ("initProp".equals(testParam))
- {
- String value = getInitParameter(testParam);
- out.println(testParam + "=" + value);
- }
- else if ("context".equals(testParam))
- {
- out.println(context.getBundle().getSymbolicName());
- }
- else if ("startLevel".equals(testParam))
- {
- ServiceTracker tracker = new ServiceTracker(context, StartLevel.class.getName(), null);
- tracker.open();
-
- StartLevel service = (StartLevel)tracker.getService();
- out.println("startLevel=" + service.getStartLevel());
- }
- else
- {
- throw new IllegalArgumentException("Invalid 'test' parameter: " + testParam);
- }
-
- out.close();
- }
-}
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/HttpServiceRemoteTestCase.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/junit/EndpointServiceTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/HttpServiceRemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/HttpServiceRemoteTestCase.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,83 @@
+/*
+ * 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.service.http;
+
+//$Id$
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+
+/**
+ * A test that deployes a bundle that containes a HttpServlet which
+ * is registered through the OSGi HttpService
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public class HttpServiceRemoteTestCase extends IntegrationTest
+{
+ public static Test suite()
+ {
+ return new IntegrationTestSetup(HttpServiceRemoteTestCase.class, "http-service.jar");
+ }
+
+ public void testServletAccess() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8090/servlet?test=plain");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("Hello from Servlet", br.readLine());
+ }
+
+ public void testServletInitProps() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8090/servlet?test=initProp");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("initProp=SomeValue", br.readLine());
+ }
+
+ public void testServletBundleContext() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8090/servlet?test=context");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("http-service-test", br.readLine());
+ }
+
+ public void testServletStartLevel() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8090/servlet?test=startLevel");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("startLevel=1", br.readLine());
+ }
+
+ public void testResourceAccess() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8090/file/message.txt");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("Hello from Resource", br.readLine());
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/ServiceActivator.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/ServiceActivator.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,61 +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.service.http;
-
-//$Id$
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * A Service Activator
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Feb-2009
- */
-public class ServiceActivator implements BundleActivator
-{
- private ServiceRegistration registration;
-
- /*
- * Implements BundleActivator.start().
- * Registers an instance of a HttpEndpoint Service using the bundle context.
- */
- public void start(BundleContext context)
- {
- EndpointService service = new EndpointService(context);
- registration = context.registerService(EndpointService.class.getName(), service, null);
- }
-
- /*
- * Implements BundleActivator.stop().
- */
- public void stop(BundleContext context)
- {
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointService.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointService.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointService.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointService.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,99 @@
+/*
+ * 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.service.http.bundle;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpService;
+
+/**
+ * A service that creates an Http context through the HttpService
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public class EndpointService implements ServiceListener
+{
+ private BundleContext context;
+
+ public EndpointService(BundleContext context)
+ {
+ this.context = context;
+ context.addServiceListener(this);
+ }
+
+ private void registerService()
+ {
+ try
+ {
+ HttpService httpService = getHttpService();
+
+ Properties initParams = new Properties();
+ initParams.setProperty("initProp", "SomeValue");
+ httpService.registerServlet("/servlet", new EndpointServlet(context), initParams, null);
+ httpService.registerResources("/file", "/res", null);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Cannot register context", ex);
+ }
+ }
+
+ private void unregisterService()
+ {
+ HttpService httpService = getHttpService();
+ httpService.unregister("/servlet");
+ httpService.unregister("/file");
+ context.removeServiceListener(this);
+ }
+
+ private HttpService getHttpService()
+ {
+ ServiceReference sref = context.getServiceReference(HttpService.class.getName());
+ if (sref == null)
+ throw new IllegalStateException("HttpService not registered");
+
+ return (HttpService)context.getService(sref);
+ }
+
+ public void serviceChanged(ServiceEvent event)
+ {
+ Object service = context.getService(event.getServiceReference());
+ if (service == this)
+ {
+ if (event.getType() == ServiceEvent.REGISTERED)
+ {
+ registerService();
+ }
+ else if (event.getType() == ServiceEvent.UNREGISTERING)
+ {
+ unregisterService();
+ }
+ }
+ }
+}
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointServlet.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/EndpointServlet.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointServlet.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointServlet.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,83 @@
+/*
+ * 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.service.http.bundle;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+
+@SuppressWarnings("serial")
+public class EndpointServlet extends HttpServlet
+{
+ private BundleContext context;
+
+ // This hides the default ctor and verifies that this instance is used
+ public EndpointServlet(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ PrintWriter out = res.getWriter();
+
+ String testParam = req.getParameter("test");
+ if ("plain".equals(testParam))
+ {
+ out.println("Hello from Servlet");
+ }
+ else if ("initProp".equals(testParam))
+ {
+ String value = getInitParameter(testParam);
+ out.println(testParam + "=" + value);
+ }
+ else if ("context".equals(testParam))
+ {
+ out.println(context.getBundle().getSymbolicName());
+ }
+ else if ("startLevel".equals(testParam))
+ {
+ ServiceTracker tracker = new ServiceTracker(context, StartLevel.class.getName(), null);
+ tracker.open();
+
+ StartLevel service = (StartLevel)tracker.getService();
+ out.println("startLevel=" + service.getStartLevel());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid 'test' parameter: " + testParam);
+ }
+
+ out.close();
+ }
+}
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/ServiceActivator.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/ServiceActivator.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,61 @@
+/*
+ * 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.service.http.bundle;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Feb-2009
+ */
+public class ServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ /*
+ * Implements BundleActivator.start().
+ * Registers an instance of a HttpEndpoint Service using the bundle context.
+ */
+ public void start(BundleContext context)
+ {
+ EndpointService service = new EndpointService(context);
+ registration = context.registerService(EndpointService.class.getName(), service, null);
+ }
+
+ /*
+ * Implements BundleActivator.stop().
+ */
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/Foo.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/Foo.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/Foo.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,32 +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.service.microcontainer;
-
-//$Id$
-
-public class Foo implements FooMBean
-{
- public String echo(String msg)
- {
- return msg;
- }
-}
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/FooMBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/FooMBean.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/FooMBean.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,29 +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.service.microcontainer;
-
-//$Id$
-
-public interface FooMBean
-{
- String echo(String msg);
-}
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanServiceRemoteTestCase.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/junit/MicrocontainerServiceTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanServiceRemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanServiceRemoteTestCase.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,52 @@
+/*
+ * 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.service.microcontainer;
+
+//$Id$
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.test.osgi.service.microcontainer.bundle.FooMBean;
+import org.jboss.test.osgi.service.microcontainer.bundle.MBeanTestService;
+
+/**
+ * A test that deployes a bundle that registeres an MBean
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 12-Feb-2009
+ */
+public class MBeanServiceRemoteTestCase extends IntegrationTest
+{
+ public static Test suite()
+ {
+ return new IntegrationTestSetup(MBeanServiceRemoteTestCase.class, "microcontainer-service.jar");
+ }
+
+ public void testMBeanAccess() throws Exception
+ {
+ FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, MBeanTestService.OBJECT_NAME, getServer());
+ assertEquals("hello", foo.echo("hello"));
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanTestService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanTestService.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanTestService.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,106 +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.service.microcontainer;
-
-//$Id$
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.osgi.service.MicrocontainerService;
-import org.jboss.osgi.spi.management.ObjectNameFactory;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-
-/**
- * A service that registers an MBean
- *
- * @author thomas.diesler(a)jboss.com
- * @since 23-Jan-2009
- */
-public class MBeanTestService implements ServiceListener
-{
- public static ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.osgi:service=mbean-test-service");
-
- private BundleContext context;
- private MBeanServer mbeanServer;
-
- public MBeanTestService(BundleContext context)
- {
- this.context = context;
- context.addServiceListener(this);
- }
-
- private void registerService()
- {
- try
- {
- MicrocontainerService mcService = getMicrocontainerService();
- mbeanServer = mcService.getMbeanServer();
- mbeanServer.registerMBean(new Foo(), OBJECT_NAME);
- }
- catch (Exception ex)
- {
- throw new RuntimeException("Cannot register mbean", ex);
- }
- }
-
- private void unregisterService()
- {
- try
- {
- if (mbeanServer != null && mbeanServer.isRegistered(OBJECT_NAME))
- mbeanServer.unregisterMBean(OBJECT_NAME);
- }
- catch (Exception ex)
- {
- throw new RuntimeException("Cannot unregister mbean", ex);
- }
- }
-
- private MicrocontainerService getMicrocontainerService()
- {
- ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
- if (sref == null)
- throw new IllegalStateException("MicrocontainerService not registered");
-
- return (MicrocontainerService)context.getService(sref);
- }
-
- public void serviceChanged(ServiceEvent event)
- {
- Object service = context.getService(event.getServiceReference());
- if (service == this)
- {
- if (event.getType() == ServiceEvent.REGISTERED)
- {
- registerService();
- }
- else if (event.getType() == ServiceEvent.UNREGISTERING)
- {
- unregisterService();
- }
- }
- }
-}
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/ServiceActivator.java 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/ServiceActivator.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,54 +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.service.microcontainer;
-
-//$Id$
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * A Service Activator
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Feb-2009
- */
-public class ServiceActivator implements BundleActivator
-{
- private ServiceRegistration registration;
-
- public void start(BundleContext context)
- {
- MBeanTestService service = new MBeanTestService(context);
- registration = context.registerService(MBeanTestService.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
- }
-}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/Foo.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/Foo.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/Foo.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,34 @@
+/*
+ * 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.service.microcontainer.bundle;
+
+
+
+//$Id$
+
+public class Foo implements FooMBean
+{
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/Foo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/FooMBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/FooMBean.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/FooMBean.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,29 @@
+/*
+ * 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.service.microcontainer.bundle;
+
+//$Id$
+
+public interface FooMBean
+{
+ String echo(String msg);
+}
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/FooMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java (from rev 87033, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanTestService.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,107 @@
+/*
+ * 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.service.microcontainer.bundle;
+
+//$Id$
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.osgi.service.MicrocontainerService;
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+import org.jboss.test.osgi.service.microcontainer.bundle.Foo;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A service that registers an MBean
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Jan-2009
+ */
+public class MBeanTestService implements ServiceListener
+{
+ public static ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.osgi:service=mbean-test-service");
+
+ private BundleContext context;
+ private MBeanServer mbeanServer;
+
+ public MBeanTestService(BundleContext context)
+ {
+ this.context = context;
+ context.addServiceListener(this);
+ }
+
+ private void registerService()
+ {
+ try
+ {
+ MicrocontainerService mcService = getMicrocontainerService();
+ mbeanServer = mcService.getMbeanServer();
+ mbeanServer.registerMBean(new Foo(), OBJECT_NAME);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Cannot register mbean", ex);
+ }
+ }
+
+ private void unregisterService()
+ {
+ try
+ {
+ if (mbeanServer != null && mbeanServer.isRegistered(OBJECT_NAME))
+ mbeanServer.unregisterMBean(OBJECT_NAME);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Cannot unregister mbean", ex);
+ }
+ }
+
+ private MicrocontainerService getMicrocontainerService()
+ {
+ ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
+ if (sref == null)
+ throw new IllegalStateException("MicrocontainerService not registered");
+
+ return (MicrocontainerService)context.getService(sref);
+ }
+
+ public void serviceChanged(ServiceEvent event)
+ {
+ Object service = context.getService(event.getServiceReference());
+ if (service == this)
+ {
+ if (event.getType() == ServiceEvent.REGISTERED)
+ {
+ registerService();
+ }
+ else if (event.getType() == ServiceEvent.UNREGISTERING)
+ {
+ unregisterService();
+ }
+ }
+ }
+}
Added: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/ServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/ServiceActivator.java 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,54 @@
+/*
+ * 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.service.microcontainer.bundle;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Feb-2009
+ */
+public class ServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ public void start(BundleContext context)
+ {
+ MBeanTestService service = new MBeanTestService(context);
+ registration = context.registerService(MBeanTestService.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/jbosgi39-bundleB.jar src/test/resources/jbosgi39/bundleB.bnd
+
+Bundle-SymbolicName: jbosgi39-bundleB
+Bundle-Activator: org.jboss.test.osgi.jbosgi39.bundleB.ServiceActivator
+Export-Package: org.jboss.test.osgi.jbosgi39.bundleB
+
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleX.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleX.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi39/jbosgi39-bundleX.bnd 2009-04-09 11:08:56 UTC (rev 87064)
@@ -0,0 +1,5 @@
+# bnd build -classpath target/test-classes -output target/test-libs/jbosgi39-bundleX.jar src/test/resources/jbosgi39/bundleX.bnd
+
+Bundle-SymbolicName: jbosgi39-bundleX
+Export-Package: org.jboss.test.osgi.jbosgi39.bundleX
+
Modified: projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/http-service.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/http-service.bnd 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/http-service.bnd 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,8 +1,8 @@
# bnd build -classpath target/test-classes -output target/test-libs/http-service.jar src/test/resources/service/http/http-service.bnd
Bundle-SymbolicName: http-service-test
-Bundle-Activator: org.jboss.test.osgi.service.http.ServiceActivator
-Export-Package: org.jboss.test.osgi.service.http
+Bundle-Activator: org.jboss.test.osgi.service.http.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.service.http.bundle
Include-Resource: res/message.txt=message.txt
# For some reason this does not work
Modified: projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd 2009-04-09 10:51:48 UTC (rev 87063)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd 2009-04-09 11:08:56 UTC (rev 87064)
@@ -1,5 +1,5 @@
# bnd build -classpath target/test-classes -output target/test-libs/microcontainer-service.jar src/test/resources/service/microcontainer/microcontainer-service.bnd
Bundle-SymbolicName: microcontainer-service-test
-Bundle-Activator: org.jboss.test.osgi.service.microcontainer.ServiceActivator
-Export-Package: org.jboss.test.osgi.service.microcontainer
+Bundle-Activator: org.jboss.test.osgi.service.microcontainer.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.service.microcontainer.bundle
16 years, 8 months
JBoss-OSGI SVN: r86978 - in projects/jboss-osgi/trunk/runtime: knopflerfish and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-08 13:40:16 -0400 (Wed, 08 Apr 2009)
New Revision: 86978
Modified:
projects/jboss-osgi/trunk/runtime/equinox/pom.xml
projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml
Log:
Disable testsuite tests for equinox, knopflerfish
Modified: projects/jboss-osgi/trunk/runtime/equinox/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/pom.xml 2009-04-08 17:37:05 UTC (rev 86977)
+++ projects/jboss-osgi/trunk/runtime/equinox/pom.xml 2009-04-08 17:40:16 UTC (rev 86978)
@@ -176,73 +176,18 @@
</execution>
</executions>
</plugin>
- </plugins>
- </build>
- </profile>
-
- <!--
- Name: embedded-tesing
- Descr: Setup for embedded integration testing
- -->
- <profile>
- <id>embedded-tesing</id>
- <activation>
- <property>
- <name>!jboss.bind.address</name>
- </property>
- </activation>
- <build>
- <plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <excludes>
- <!-- Exclude all testsuite tests -->
- <exclude>org/jboss/test/osgi/jbosgi*/**</exclude>
- <exclude>org/jboss/test/osgi/service/**</exclude>
- </excludes>
+ <includes>
+ <include>org/jboss/test/osgi/equinox/**</include>
+ </includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
- <!--
- Name: remote-tesing
- Descr: Setup for remote integration testing
- -->
- <profile>
- <id>remote-tesing</id>
- <activation>
- <property>
- <name>jboss.bind.address</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-client</artifactId>
- <scope>test</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>${surefire.security.args}</argLine>
- <excludes>
- <!-- Exclude all testsuite tests -->
- <exclude>org/jboss/test/osgi/jbosgi*/**</exclude>
- <exclude>org/jboss/test/osgi/service/**</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
</profiles>
</project>
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml 2009-04-08 17:37:05 UTC (rev 86977)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/pom.xml 2009-04-08 17:40:16 UTC (rev 86978)
@@ -176,73 +176,18 @@
</execution>
</executions>
</plugin>
- </plugins>
- </build>
- </profile>
-
- <!--
- Name: embedded-tesing
- Descr: Setup for embedded integration testing
- -->
- <profile>
- <id>embedded-tesing</id>
- <activation>
- <property>
- <name>!jboss.bind.address</name>
- </property>
- </activation>
- <build>
- <plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <excludes>
- <!-- Exclude all testsuite tests -->
- <exclude>org/jboss/test/osgi/jbosgi*/**</exclude>
- <exclude>org/jboss/test/osgi/service/**</exclude>
- </excludes>
+ <includes>
+ <include>org/jboss/test/osgi/knopflerfish/**</include>
+ </includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
- <!--
- Name: remote-tesing
- Descr: Setup for remote integration testing
- -->
- <profile>
- <id>remote-tesing</id>
- <activation>
- <property>
- <name>jboss.bind.address</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-client</artifactId>
- <scope>test</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>${surefire.security.args}</argLine>
- <excludes>
- <!-- Exclude all testsuite tests -->
- <exclude>org/jboss/test/osgi/jbosgi*/**</exclude>
- <exclude>org/jboss/test/osgi/service/**</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
</profiles>
</project>
16 years, 8 months
JBoss-OSGI SVN: r86976 - in projects/jboss-osgi/trunk: testsuite and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-08 13:24:49 -0400 (Wed, 08 Apr 2009)
New Revision: 86976
Added:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java
Removed:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java
Modified:
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Rename DeployerTest to RemoteTest
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 17:21:20 UTC (rev 86975)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 17:24:49 UTC (rev 86976)
@@ -195,7 +195,7 @@
<excludes>
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/deployer/**</exclude>
- <exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
+ <exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
<!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 17:21:20 UTC (rev 86975)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 17:24:49 UTC (rev 86976)
@@ -190,7 +190,7 @@
<excludes>
<!-- Exclude tests that require remote access -->
<exclude>org/jboss/test/osgi/deployer/**</exclude>
- <exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
+ <exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
<!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java 2009-04-08 17:24:49 UTC (rev 86976)
@@ -1,69 +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$
-
-import org.jboss.osgi.spi.framework.RemoteBundle;
-import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-39] Bundle undeploy does not clean up properly
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-39
- *
- * Bundle B depends on bundle X.
- *
- * B ---> X
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Mar-2009
- */
-public class OSGI39DeployerTestCase extends IntegrationTest
-{
- public void testFirstRun() throws Exception
- {
- installBBeforeX();
- }
-
- public void testSecondRun() throws Exception
- {
- installBBeforeX();
- }
-
- private void installBBeforeX() throws Exception
- {
- RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
-
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- // Undeploy X before B
- undeployBundle("jbosgi38-bundleX");
- undeployBundle("jbosgi38-bundleB");
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java (from rev 86975, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java 2009-04-08 17:24:49 UTC (rev 86976)
@@ -0,0 +1,69 @@
+/*
+ * 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$
+
+import org.jboss.osgi.spi.framework.RemoteBundle;
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
+
+/**
+ * [JBOSGI-39] Bundle undeploy does not clean up properly
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-39
+ *
+ * Bundle B depends on bundle X.
+ *
+ * B ---> X
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public class OSGI39RemoteTestCase extends IntegrationTest
+{
+ public void testFirstRun() throws Exception
+ {
+ installBBeforeX();
+ }
+
+ public void testSecondRun() throws Exception
+ {
+ installBBeforeX();
+ }
+
+ private void installBBeforeX() throws Exception
+ {
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ // Undeploy X before B
+ undeployBundle("jbosgi38-bundleX");
+ undeployBundle("jbosgi38-bundleB");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39RemoteTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java 2009-04-08 17:24:49 UTC (rev 86976)
@@ -1,67 +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.jbosgi41;
-
-//$Id$
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-
-import org.jboss.osgi.spi.framework.RemoteBundle;
-import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-41] Verify persistent file storage
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-41
- *
- * @author thomas.diesler(a)jboss.com
- * @since 05-Mar-2009
- */
-public class OSGI41DeployerTestCase extends IntegrationTest
-{
- public void testFirstRun() throws Exception
- {
- RemoteBundle bundleA = deployBundle("jbosgi41-bundleA");
- assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
-
- File dataFile = getBundleDataFile(bundleA, "config/jbosgi41.txt");
- assertTrue("File exists: " + dataFile, dataFile.exists());
-
- BufferedReader br = new BufferedReader(new FileReader(dataFile));
- String symbolicName = br.readLine();
- assertEquals("jbosgi41-bundleA", symbolicName);
-
- undeployBundle("jbosgi41-bundleA");
- }
-
- private File getBundleDataFile(RemoteBundle bundleA, String filename)
- {
- String storageRoot = bundleA.getProperty("org.osgi.framework.storage");
- assertNotNull("Storage dir not null", storageRoot);
-
- File dataFile = new File(storageRoot + "/bundle" + bundleA.getBundleId() + "/data/" + filename);
- return dataFile;
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java (from rev 86975, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java 2009-04-08 17:24:49 UTC (rev 86976)
@@ -0,0 +1,67 @@
+/*
+ * 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.jbosgi41;
+
+//$Id$
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+
+import org.jboss.osgi.spi.framework.RemoteBundle;
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
+
+/**
+ * [JBOSGI-41] Verify persistent file storage
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-41
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 05-Mar-2009
+ */
+public class OSGI41RemoteTestCase extends IntegrationTest
+{
+ public void testFirstRun() throws Exception
+ {
+ RemoteBundle bundleA = deployBundle("jbosgi41-bundleA");
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
+
+ File dataFile = getBundleDataFile(bundleA, "config/jbosgi41.txt");
+ assertTrue("File exists: " + dataFile, dataFile.exists());
+
+ BufferedReader br = new BufferedReader(new FileReader(dataFile));
+ String symbolicName = br.readLine();
+ assertEquals("jbosgi41-bundleA", symbolicName);
+
+ undeployBundle("jbosgi41-bundleA");
+ }
+
+ private File getBundleDataFile(RemoteBundle bundleA, String filename)
+ {
+ String storageRoot = bundleA.getProperty("org.osgi.framework.storage");
+ assertNotNull("Storage dir not null", storageRoot);
+
+ File dataFile = new File(storageRoot + "/bundle" + bundleA.getBundleId() + "/data/" + filename);
+ return dataFile;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41RemoteTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java 2009-04-08 17:24:49 UTC (rev 86976)
@@ -1,46 +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.service.startlevel;
-
-//$Id$
-
-import org.jboss.osgi.spi.framework.RemoteBundle;
-import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.osgi.framework.Bundle;
-
-/**
- * Deploy a bundle that accesses the StartLevel service
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Mar-2009
- */
-public class StartLevelDeployerTestCase extends IntegrationTest
-{
- public void testStartLevel() throws Exception
- {
- RemoteBundle bundle = deployBundle("startlevel-service");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundle.getState());
-
- undeployBundle("startlevel-service");
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java (from rev 86975, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java 2009-04-08 17:24:49 UTC (rev 86976)
@@ -0,0 +1,46 @@
+/*
+ * 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.service.startlevel;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.RemoteBundle;
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
+
+/**
+ * Deploy a bundle that accesses the StartLevel service
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public class StartLevelRemoteTestCase extends IntegrationTest
+{
+ public void testStartLevel() throws Exception
+ {
+ RemoteBundle bundle = deployBundle("startlevel-service");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundle.getState());
+
+ undeployBundle("startlevel-service");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelRemoteTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
16 years, 8 months
JBoss-OSGI SVN: r86975 - in projects/jboss-osgi/trunk: runtime/spi/src/main/java/org/jboss/osgi/spi/framework and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-08 13:21:20 -0400 (Wed, 08 Apr 2009)
New Revision: 86975
Added:
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteBundle.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFramework.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFrameworkException.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
Removed:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38DeployerTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38EmbeddedTestCase.java
Modified:
projects/jboss-osgi/trunk/build/distribution/pom.xml
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java
projects/jboss-osgi/trunk/testsuite/.classpath
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java
Log:
Add RemoteFramework, RemoteBundle
Modified: projects/jboss-osgi/trunk/build/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/build/distribution/pom.xml 2009-04-08 17:21:20 UTC (rev 86975)
@@ -42,12 +42,6 @@
<dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-runtime-deployer</artifactId>
- <classifier>config</classifier>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-runtime-deployer</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
</dependency>
Added: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteBundle.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteBundle.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteBundle.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -0,0 +1,68 @@
+/*
+ * 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.osgi.spi.framework;
+
+//$Id$
+
+import org.osgi.framework.BundleException;
+
+/**
+ * The supported functionality of a remote OSGi Bundle.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public interface RemoteBundle
+{
+ /**
+ * Returns this bundle's current state.
+ * A bundle can be in only one state at any time.
+ *
+ * @return An element of UNINSTALLED,INSTALLED, RESOLVED,STARTING, STOPPING,ACTIVE.
+ */
+ int getState();
+
+ /**
+ * Returns this bundle's unique identifier.
+ */
+ long getBundleId();
+
+ /**
+ * Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header
+ */
+ String getSymbolicName();
+
+ /**
+ * Returns the value of the specified property from the BundleContext.
+ */
+ String getProperty(String key);
+
+ /**
+ * Starts this bundle with no options
+ */
+ void start() throws BundleException;
+
+ /**
+ * Stops this bundle with no options.
+ */
+ void stop() throws BundleException;
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteBundle.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFramework.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFramework.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFramework.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -0,0 +1,45 @@
+/*
+ * 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.osgi.spi.framework;
+
+//$Id$
+
+import java.util.Set;
+
+/**
+ * The supported functionality of a remote OSGi Framework
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Mar-2009
+ */
+public interface RemoteFramework
+{
+ /**
+ * Get the list of all installed bundles
+ */
+ Set<RemoteBundle> getBundles();
+
+ /**
+ * Get the installed bundle
+ */
+ RemoteBundle getBundle(String symbolicName);
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFramework.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFrameworkException.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFrameworkException.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFrameworkException.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -0,0 +1,49 @@
+/*
+ * 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.osgi.spi.framework;
+
+// $Id$
+
+/**
+ * A remote OSGi Framework exception that should be thrown on unrecoverable errors.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 18-Jan-2009
+ */
+@SuppressWarnings("serial")
+public class RemoteFrameworkException extends RuntimeException
+{
+ public RemoteFrameworkException(String message)
+ {
+ super(message);
+ }
+
+ public RemoteFrameworkException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public RemoteFrameworkException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/framework/RemoteFrameworkException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTest.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -27,9 +27,8 @@
import javax.management.MBeanServerConnection;
-import org.jboss.osgi.spi.management.MBeanProxyException;
-import org.jboss.osgi.spi.management.ManagedBundleMBean;
-import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
+import org.jboss.osgi.spi.framework.RemoteBundle;
+import org.jboss.osgi.spi.framework.RemoteFramework;
/**
* An integration test case
@@ -70,7 +69,7 @@
getDelegate().deploy(archive);
}
- protected ManagedBundleMBean deployBundle(String bundleName) throws Exception
+ protected RemoteBundle deployBundle(String bundleName) throws Exception
{
return getDelegate().deployBundle(bundleName);
}
@@ -90,9 +89,9 @@
getDelegate().undeployBundle(bundleName);
}
- protected ManagedFrameworkMBean getManagedFramework() throws MBeanProxyException
+ protected RemoteFramework getRemoteFramework() throws Exception
{
- return getDelegate().getManagedFramework();
+ return getDelegate().getRemoteFramework();
}
protected MBeanServerConnection getServer()
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/junit/IntegrationTestHelper.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -22,7 +22,9 @@
package org.jboss.osgi.spi.junit;
import java.net.URL;
+import java.util.HashSet;
import java.util.Hashtable;
+import java.util.Set;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
@@ -31,6 +33,9 @@
import org.jboss.deployers.client.spi.DeployerClient;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.spi.framework.RemoteBundle;
+import org.jboss.osgi.spi.framework.RemoteFramework;
+import org.jboss.osgi.spi.framework.RemoteFrameworkException;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.MBeanProxyException;
import org.jboss.osgi.spi.management.ManagedBundleMBean;
@@ -138,12 +143,10 @@
}
}
- public ManagedBundleMBean deployBundle(String bundleName) throws Exception
+ public RemoteBundle deployBundle(String bundleName) throws Exception
{
deploy(bundleName + ".jar");
-
- ObjectName bundleOName = getManagedFramework().getBundle(bundleName);
- return MBeanProxy.get(ManagedBundleMBean.class, bundleOName, getServer());
+ return getRemoteFramework().getBundle(bundleName);
}
public void undeployBundle(String bundleName) throws Exception
@@ -151,12 +154,44 @@
undeploy(bundleName + ".jar");
}
- public ManagedFrameworkMBean getManagedFramework() throws MBeanProxyException
+ public RemoteFramework getRemoteFramework() throws Exception
{
if (managedFramework == null)
managedFramework = MBeanProxy.get(ManagedFrameworkMBean.class, ManagedFrameworkMBean.OBJECT_NAME, getServer());
- return managedFramework;
+ return new RemoteFramework()
+ {
+ public RemoteBundle getBundle(String symbolicName)
+ {
+ ObjectName bundleOName = managedFramework.getBundle(symbolicName);
+ try
+ {
+ return MBeanProxy.get(ManagedBundleMBean.class, bundleOName, getServer());
+ }
+ catch (MBeanProxyException ex)
+ {
+ throw new RemoteFrameworkException(ex);
+ }
+ }
+
+ public Set<RemoteBundle> getBundles()
+ {
+ Set<RemoteBundle> remBundles = new HashSet<RemoteBundle>();
+ for (ObjectName bundleOName : managedFramework.getBundles())
+ {
+ try
+ {
+ RemoteBundle remBundle = MBeanProxy.get(ManagedBundleMBean.class, bundleOName, getServer());
+ remBundles.add(remBundle);
+ }
+ catch (MBeanProxyException ex)
+ {
+ throw new RemoteFrameworkException(ex);
+ }
+ }
+ return remBundles;
+ }
+ };
}
public static boolean isRemoteIntegration()
Modified: projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/runtime/spi/src/main/java/org/jboss/osgi/spi/management/ManagedBundleMBean.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -21,13 +21,12 @@
*/
package org.jboss.osgi.spi.management;
-import javax.management.ObjectName;
-
-import org.osgi.framework.BundleException;
-
//$Id$
+import javax.management.ObjectName;
+import org.jboss.osgi.spi.framework.RemoteBundle;
+
/**
* The managed view of an OSGi Bundle.
*
@@ -38,43 +37,10 @@
* @author thomas.diesler(a)jboss.com
* @since 04-Mar-2009
*/
-public interface ManagedBundleMBean
+public interface ManagedBundleMBean extends RemoteBundle
{
/**
- * Returns this bundle's current state.
- * A bundle can be in only one state at any time.
- *
- * @return An element of UNINSTALLED,INSTALLED, RESOLVED,STARTING, STOPPING,ACTIVE.
- */
- int getState();
-
- /**
* Get the bundles object name.
*/
ObjectName getObjectName();
-
- /**
- * Returns this bundle's unique identifier.
- */
- long getBundleId();
-
- /**
- * Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header
- */
- String getSymbolicName();
-
- /**
- * Returns the value of the specified property from the BundleContext.
- */
- String getProperty(String key);
-
- /**
- * Starts this bundle with no options
- */
- void start() throws BundleException;
-
- /**
- * Stops this bundle with no options.
- */
- void stop() throws BundleException;
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/.classpath
===================================================================
--- projects/jboss-osgi/trunk/testsuite/.classpath 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/testsuite/.classpath 2009-04-08 17:21:20 UTC (rev 86975)
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jboss-osgi-runtime-spi"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38DeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38DeployerTestCase.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38DeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -1,140 +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.jbosgi38;
-
-//$Id$
-
-import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
-import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.jboss.osgi.spi.management.ManagedBundleMBean;
-import org.osgi.framework.Bundle;
-
-/**
- * [JBOSGI-38] Investigate bundle install/start behaviour with random deployment order
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-38
- *
- * Bundle A depends on bundle B, both share bundle X.
- *
- * A ---> B
- * A ---> X <--- B
- *
- * @author thomas.diesler(a)jboss.com
- * @since 02-Mar-2009
- */
-public class OSGI38DeployerTestCase extends IntegrationTest
-{
- @Override
- protected OSGiBootstrapProvider getBootstrapProvider()
- {
- OSGiBootstrapProvider bootProvider = super.getBootstrapProvider();
- bootProvider.configure();
- return bootProvider;
- }
-
- /*
- * Install/Start the common bundle
- */
- public void testInstallStartX() throws Exception
- {
- ManagedBundleMBean bundleX = deployBundle("jbosgi38-bundleX");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
-
- undeployBundle("jbosgi38-bundleX");
- }
-
- /*
- * Install X, B
- */
- public void testInstallXBeforeB() throws Exception
- {
- ManagedBundleMBean bundleX = deployBundle("jbosgi38-bundleX");
- ManagedBundleMBean bundleB = deployBundle("jbosgi38-bundleB");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
- }
-
- /*
- * Install X, B, A
- */
- public void testInstallBBeforeA() throws Exception
- {
- ManagedBundleMBean bundleX = deployBundle("jbosgi38-bundleX");
- ManagedBundleMBean bundleB = deployBundle("jbosgi38-bundleB");
- ManagedBundleMBean bundleA = deployBundle("jbosgi38-bundleA");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
-
- undeployBundle("jbosgi38-bundleA");
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
- }
-
- /*
- * Install B, X
- */
- public void testInstallBBeforeX() throws Exception
- {
- ManagedBundleMBean bundleB = deployBundle("jbosgi38-bundleB");
-
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- ManagedBundleMBean bundleX = deployBundle("jbosgi38-bundleX");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
- }
-
- /*
- * Install A, B, X
- */
- public void testInstallABeforeB() throws Exception
- {
- ManagedBundleMBean bundleA = deployBundle("jbosgi38-bundleA");
-
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
-
- ManagedBundleMBean bundleB = deployBundle("jbosgi38-bundleB");
-
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- ManagedBundleMBean bundleX = deployBundle("jbosgi38-bundleX");
-
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
-
- undeployBundle("jbosgi38-bundleA");
- undeployBundle("jbosgi38-bundleB");
- undeployBundle("jbosgi38-bundleX");
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38EmbeddedTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38EmbeddedTestCase.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38EmbeddedTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -1,228 +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.jbosgi38;
-
-//$Id$
-
-import org.jboss.osgi.spi.framework.OSGiBootstrap;
-import org.jboss.osgi.spi.framework.OSGiFramework;
-import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-/**
- * [JBOSGI-38] Investigate bundle install/start behaviour with random deployment order
- *
- * https://jira.jboss.org/jira/browse/JBOSGI-38
- *
- * Bundle A depends on bundle B, both share bundle X.
- *
- * A ---> B
- * A ---> X <--- B
- *
- * @author thomas.diesler(a)jboss.com
- * @since 02-Mar-2009
- */
-public class OSGI38EmbeddedTestCase extends IntegrationTest
-{
- /*
- * Install/Start the common bundle
- */
- public void testInstallStartX() throws Exception
- {
- OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
- BundleContext sysContext = framework.getSystemBundleContext();
-
- Bundle bundleX = null;
- try
- {
- bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
-
- bundleX.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
- }
- finally
- {
- uninstall(bundleX);
- }
- }
-
- /*
- * Install X, B
- */
- public void testInstallXBeforeB() throws Exception
- {
- OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
- BundleContext sysContext = framework.getSystemBundleContext();
-
- Bundle bundleB = null;
- Bundle bundleX = null;
- try
- {
- bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
-
- bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- bundleB.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- }
- finally
- {
- uninstall(bundleB);
- uninstall(bundleX);
- }
- }
-
- /*
- * Install X, B, A
- */
- public void testInstallBBeforeA() throws Exception
- {
- OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
- BundleContext sysContext = framework.getSystemBundleContext();
-
- Bundle bundleA = null;
- Bundle bundleB = null;
- Bundle bundleX = null;
- try
- {
- bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
-
- bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleA.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
-
- bundleA.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
- }
- finally
- {
- uninstall(bundleA);
- uninstall(bundleB);
- uninstall(bundleX);
- }
- }
-
- /*
- * Install B, X
- */
- public void testInstallBBeforeX() throws Exception
- {
- OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
- BundleContext sysContext = framework.getSystemBundleContext();
-
- Bundle bundleB = null;
- Bundle bundleX = null;
- try
- {
- bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- try
- {
- bundleB.start();
- fail("Unresolved constraint expected");
- }
- catch (BundleException ex)
- {
- // expected
- }
-
- bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
-
- bundleB.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
- }
- finally
- {
- uninstall(bundleX);
- uninstall(bundleB);
- }
- }
-
- /*
- * Install A, B, X
- */
- public void testInstallABeforeB() throws Exception
- {
- OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
- BundleContext sysContext = framework.getSystemBundleContext();
-
- Bundle bundleA = null;
- Bundle bundleB = null;
- Bundle bundleX = null;
- try
- {
- bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleA.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
-
- bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
-
- try
- {
- bundleB.start();
- fail("Unresolved constraint expected");
- }
- catch (BundleException ex)
- {
- // expected
- }
-
- bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
- assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
-
- bundleB.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
-
- bundleA.start();
- assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
- }
- finally
- {
- uninstall(bundleA);
- uninstall(bundleB);
- uninstall(bundleX);
- }
- }
-
- private void uninstall(Bundle bnd)
- {
- try
- {
- if (bnd != null)
- bnd.uninstall();
- }
- catch (BundleException ex)
- {
- System.err.println(ex.toString());
- }
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java (from rev 86968, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38DeployerTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -0,0 +1,131 @@
+/*
+ * 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.jbosgi38;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.RemoteBundle;
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
+
+/**
+ * [JBOSGI-38] Investigate bundle install/start behaviour with random deployment order
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-38
+ *
+ * Bundle A depends on bundle B, both share bundle X.
+ *
+ * A ---> B
+ * A ---> X <--- B
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 02-Mar-2009
+ */
+public class OSGI38RemoteTestCase extends IntegrationTest
+{
+ /*
+ * Install/Start the common bundle
+ */
+ public void testInstallStartX() throws Exception
+ {
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+
+ undeployBundle("jbosgi38-bundleX");
+ }
+
+ /*
+ * Install X, B
+ */
+ public void testInstallXBeforeB() throws Exception
+ {
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ undeployBundle("jbosgi38-bundleB");
+ undeployBundle("jbosgi38-bundleX");
+ }
+
+ /*
+ * Install X, B, A
+ */
+ public void testInstallBBeforeA() throws Exception
+ {
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+ RemoteBundle bundleA = deployBundle("jbosgi38-bundleA");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
+
+ undeployBundle("jbosgi38-bundleA");
+ undeployBundle("jbosgi38-bundleB");
+ undeployBundle("jbosgi38-bundleX");
+ }
+
+ /*
+ * Install B, X
+ */
+ public void testInstallBBeforeX() throws Exception
+ {
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ undeployBundle("jbosgi38-bundleB");
+ undeployBundle("jbosgi38-bundleX");
+ }
+
+ /*
+ * Install A, B, X
+ */
+ public void testInstallABeforeB() throws Exception
+ {
+ RemoteBundle bundleA = deployBundle("jbosgi38-bundleA");
+
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
+
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
+
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
+
+ undeployBundle("jbosgi38-bundleA");
+ undeployBundle("jbosgi38-bundleB");
+ undeployBundle("jbosgi38-bundleX");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38RemoteTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java (from rev 86968, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38EmbeddedTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -0,0 +1,228 @@
+/*
+ * 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.jbosgi38;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * [JBOSGI-38] Investigate bundle install/start behaviour with random deployment order
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-38
+ *
+ * Bundle A depends on bundle B, both share bundle X.
+ *
+ * A ---> B
+ * A ---> X <--- B
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 02-Mar-2009
+ */
+public class OSGI38TestCase extends IntegrationTest
+{
+ /*
+ * Install/Start the common bundle
+ */
+ public void testInstallStartX() throws Exception
+ {
+ OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleX = null;
+ try
+ {
+ bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
+
+ bundleX.start();
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
+ }
+ finally
+ {
+ uninstall(bundleX);
+ }
+ }
+
+ /*
+ * Install X, B
+ */
+ public void testInstallXBeforeB() throws Exception
+ {
+ OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleB = null;
+ Bundle bundleX = null;
+ try
+ {
+ bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
+
+ bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ bundleB.start();
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+ }
+ finally
+ {
+ uninstall(bundleB);
+ uninstall(bundleX);
+ }
+ }
+
+ /*
+ * Install X, B, A
+ */
+ public void testInstallBBeforeA() throws Exception
+ {
+ OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleA = null;
+ Bundle bundleB = null;
+ Bundle bundleX = null;
+ try
+ {
+ bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
+
+ bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleA.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+
+ bundleA.start();
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
+ }
+ finally
+ {
+ uninstall(bundleA);
+ uninstall(bundleB);
+ uninstall(bundleX);
+ }
+ }
+
+ /*
+ * Install B, X
+ */
+ public void testInstallBBeforeX() throws Exception
+ {
+ OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleB = null;
+ Bundle bundleX = null;
+ try
+ {
+ bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
+
+ bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
+
+ bundleB.start();
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+ }
+ finally
+ {
+ uninstall(bundleX);
+ uninstall(bundleB);
+ }
+ }
+
+ /*
+ * Install A, B, X
+ */
+ public void testInstallABeforeB() throws Exception
+ {
+ OSGiFramework framework = OSGiBootstrap.getBootstrapProvider().getFramework();
+ BundleContext sysContext = framework.getSystemBundleContext();
+
+ Bundle bundleA = null;
+ Bundle bundleB = null;
+ Bundle bundleX = null;
+ try
+ {
+ bundleA = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleA.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+
+ bundleB = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleB.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
+
+ try
+ {
+ bundleB.start();
+ fail("Unresolved constraint expected");
+ }
+ catch (BundleException ex)
+ {
+ // expected
+ }
+
+ bundleX = sysContext.installBundle(getTestArchiveURL("jbosgi38-bundleX.jar").toExternalForm());
+ assertEquals("Bundle installed", Bundle.INSTALLED, bundleX.getState());
+
+ bundleB.start();
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
+
+ bundleA.start();
+ assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
+ }
+ finally
+ {
+ uninstall(bundleA);
+ uninstall(bundleB);
+ uninstall(bundleX);
+ }
+ }
+
+ private void uninstall(Bundle bnd)
+ {
+ try
+ {
+ if (bnd != null)
+ bnd.uninstall();
+ }
+ catch (BundleException ex)
+ {
+ System.err.println(ex.toString());
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi38/OSGI38TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi39/OSGI39DeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -23,8 +23,8 @@
//$Id$
+import org.jboss.osgi.spi.framework.RemoteBundle;
import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.jboss.osgi.spi.management.ManagedBundleMBean;
import org.osgi.framework.Bundle;
/**
@@ -53,11 +53,11 @@
private void installBBeforeX() throws Exception
{
- ManagedBundleMBean bundleB = deployBundle("jbosgi38-bundleB");
+ RemoteBundle bundleB = deployBundle("jbosgi38-bundleB");
assertEquals("Bundle installed", Bundle.INSTALLED, bundleB.getState());
- ManagedBundleMBean bundleX = deployBundle("jbosgi38-bundleX");
+ RemoteBundle bundleX = deployBundle("jbosgi38-bundleX");
assertEquals("Bundle active", Bundle.ACTIVE, bundleX.getState());
assertEquals("Bundle active", Bundle.ACTIVE, bundleB.getState());
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi41/OSGI41DeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -27,8 +27,8 @@
import java.io.File;
import java.io.FileReader;
+import org.jboss.osgi.spi.framework.RemoteBundle;
import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.jboss.osgi.spi.management.ManagedBundleMBean;
import org.osgi.framework.Bundle;
/**
@@ -43,7 +43,7 @@
{
public void testFirstRun() throws Exception
{
- ManagedBundleMBean bundleA = deployBundle("jbosgi41-bundleA");
+ RemoteBundle bundleA = deployBundle("jbosgi41-bundleA");
assertEquals("Bundle active", Bundle.ACTIVE, bundleA.getState());
File dataFile = getBundleDataFile(bundleA, "config/jbosgi41.txt");
@@ -56,7 +56,7 @@
undeployBundle("jbosgi41-bundleA");
}
- private File getBundleDataFile(ManagedBundleMBean bundleA, String filename)
+ private File getBundleDataFile(RemoteBundle bundleA, String filename)
{
String storageRoot = bundleA.getProperty("org.osgi.framework.storage");
assertNotNull("Storage dir not null", storageRoot);
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java 2009-04-08 17:12:11 UTC (rev 86974)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/startlevel/StartLevelDeployerTestCase.java 2009-04-08 17:21:20 UTC (rev 86975)
@@ -23,8 +23,8 @@
//$Id$
+import org.jboss.osgi.spi.framework.RemoteBundle;
import org.jboss.osgi.spi.junit.IntegrationTest;
-import org.jboss.osgi.spi.management.ManagedBundleMBean;
import org.osgi.framework.Bundle;
/**
@@ -37,7 +37,7 @@
{
public void testStartLevel() throws Exception
{
- ManagedBundleMBean bundle = deployBundle("startlevel-service");
+ RemoteBundle bundle = deployBundle("startlevel-service");
assertEquals("Bundle active", Bundle.ACTIVE, bundle.getState());
16 years, 8 months
JBoss-OSGI SVN: r86968 - in projects/jboss-osgi/trunk: testsuite and 11 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-08 11:51:12 -0400 (Wed, 08 Apr 2009)
New Revision: 86968
Added:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/
projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties
projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy
Removed:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36/
Modified:
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/SomeInternal.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.java
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/META-INF/jbosgi36-jboss-beans.xml
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/jbosgi36.bnd
Log:
[JBOSGI-36] Move to deployer section
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 15:30:43 UTC (rev 86967)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -194,6 +194,7 @@
<configuration>
<excludes>
<!-- Exclude tests that require remote access -->
+ <exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 15:30:43 UTC (rev 86967)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -189,6 +189,7 @@
<configuration>
<excludes>
<!-- Exclude tests that require remote access -->
+ <exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
Modified: projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-08 15:30:43 UTC (rev 86967)
+++ projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -43,13 +43,13 @@
<!-- Please add alphabetically -->
<!-- jbosgi36 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/jbosgi36/jbosgi36.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/deployer/jbosgi36/jbosgi36.bnd" />
<jar jarfile="${tests.output.dir}/test-libs/jbosgi36-mbean.jar">
<fileset dir="${tests.classes.dir}">
- <include name="org/jboss/test/osgi/jbosgi36/mbean/Foo.class" />
- <include name="org/jboss/test/osgi/jbosgi36/mbean/FooMBean.class" />
+ <include name="org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.class" />
+ <include name="org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.class" />
</fileset>
- <fileset dir="${tests.resources.dir}/jbosgi36">
+ <fileset dir="${tests.resources.dir}/deployer/jbosgi36">
<include name="META-INF/jbosgi36-jboss-beans.xml" />
</fileset>
</jar>
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/OSGI36TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,88 @@
+/*
+ * 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.deployer.jbosgi36;
+
+//$Id$
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.spi.management.MBeanProxyException;
+import org.jboss.test.osgi.deployer.jbosgi36.mbean.FooMBean;
+
+/**
+ * [JBOSGI-36] Bundle classes leak into system classloader
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-36
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 25-Feb-2009
+ */
+public class OSGI36TestCase extends IntegrationTest
+{
+ static IntegrationTestSetup setup;
+
+ public static Test suite()
+ {
+ setup = new IntegrationTestSetup(OSGI36TestCase.class, "jbosgi36-bundle.jar, jbosgi36-mbean.jar");
+ return setup;
+ }
+
+ public void testAccessMBean() throws Exception
+ {
+ assertEquals("hello", getFooMBean().echo("hello"));
+ }
+
+ public void testAccessSomeService() throws Exception
+ {
+ try
+ {
+ String loaderName = getFooMBean().accessSomeService();
+ fail("Unexpected classloader: " + loaderName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ // expected
+ }
+ }
+
+ public void testAccessSomeInternal() throws Exception
+ {
+ try
+ {
+ String loaderName = getFooMBean().accessSomeInternal();
+ fail("Unexpected classloader: " + loaderName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ // expected
+ }
+ }
+
+ private FooMBean getFooMBean() throws MBeanProxyException
+ {
+ FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, FooMBean.OBJECT_NAME, getServer());
+ return foo;
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/SomeService.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,34 @@
+/*
+ * 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.deployer.jbosgi36.bundle;
+
+import org.jboss.test.osgi.deployer.jbosgi36.bundle.internal.SomeInternal;
+
+//$Id$
+
+public class SomeService
+{
+ public String doStuff()
+ {
+ return SomeInternal.class.getName();
+ }
+}
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/SomeServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,54 @@
+/*
+ * 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.deployer.jbosgi36.bundle;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Feb-2009
+ */
+public class SomeServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ public void start(BundleContext context)
+ {
+ SomeService service = new SomeService();
+ registration = context.registerService(SomeService.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/internal)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/SomeInternal.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/internal/SomeInternal.java 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/SomeInternal.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -19,7 +19,7 @@
* 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.jbosgi36.bundle.internal;
+package org.jboss.test.osgi.deployer.jbosgi36.bundle.internal;
//$Id$
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/mbean)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/mbean/Foo.java 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -19,7 +19,7 @@
* 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.jbosgi36.mbean;
+package org.jboss.test.osgi.deployer.jbosgi36.mbean;
//$Id$
@@ -36,14 +36,14 @@
public String accessSomeService() throws ClassNotFoundException
{
ClassLoader loader = getClass().getClassLoader();
- loader.loadClass("org.jboss.test.osgi.jbosgi36.bundle.SomeService");
+ loader.loadClass("org.jboss.test.osgi.deployer.jbosgi36.bundle.SomeService");
return loader.toString();
}
public String accessSomeInternal() throws ClassNotFoundException
{
ClassLoader loader = getClass().getClassLoader();
- loader.loadClass("org.jboss.test.osgi.jbosgi36.bundle.internal.SomeInternal");
+ loader.loadClass("org.jboss.test.osgi.deployer.jbosgi36.bundle.internal.SomeInternal");
return loader.toString();
}
}
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/mbean/FooMBean.java 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -19,7 +19,7 @@
* 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.jbosgi36.mbean;
+package org.jboss.test.osgi.deployer.jbosgi36.mbean;
// $Id$
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36 (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/META-INF/jbosgi36-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36/META-INF/jbosgi36-jboss-beans.xml 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/META-INF/jbosgi36-jboss-beans.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -1,6 +1,6 @@
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="Foo" class="org.jboss.test.osgi.jbosgi36.mbean.Foo"/>
+ <bean name="Foo" class="org.jboss.test.osgi.deployer.jbosgi36.mbean.Foo"/>
</deployment>
Modified: projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/jbosgi36.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36/jbosgi36.bnd 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/jbosgi36.bnd 2009-04-08 15:51:12 UTC (rev 86968)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi36-bundle.jar src/test/resources/jbosgi36/jbosgi36.bnd
Bundle-SymbolicName: jbosgi36
-Bundle-Activator: org.jboss.test.osgi.jbosgi36.bundle.SomeServiceActivator
-Export-Package: org.jboss.test.osgi.jbosgi36.bundle
-Private-Package: org.jboss.test.osgi.jbosgi36.bundle.internal
+Bundle-Activator: org.jboss.test.osgi.deployer.jbosgi36.bundle.SomeServiceActivator
+Export-Package: org.jboss.test.osgi.deployer.jbosgi36.bundle
+Private-Package: org.jboss.test.osgi.deployer.jbosgi36.bundle.internal
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://@jboss.bind.address@:1099
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,4 @@
+grant {
+ permission java.security.AllPermission;
+};
+
16 years, 8 months
JBoss-OSGI SVN: r86967 - in projects/jboss-osgi/trunk: runtime/felix and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-08 11:30:43 -0400 (Wed, 08 Apr 2009)
New Revision: 86967
Modified:
projects/jboss-osgi/trunk/runtime/equinox/.classpath
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Optimize testsuite build
Modified: projects/jboss-osgi/trunk/runtime/equinox/.classpath
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/.classpath 2009-04-08 14:44:32 UTC (rev 86966)
+++ projects/jboss-osgi/trunk/runtime/equinox/.classpath 2009-04-08 15:30:43 UTC (rev 86967)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" path="src/testsuite/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 14:44:32 UTC (rev 86966)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 15:30:43 UTC (rev 86967)
@@ -197,8 +197,6 @@
<exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
- <!-- [JBOSGI-36] Bundle classes leak into system classloader -->
- <exclude>org/jboss/test/osgi/jbosgi36/*TestCase.java</exclude>
<!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
<exclude>org/jboss/test/osgi/jbosgi39/*TestCase.java</exclude>
</excludes>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 14:44:32 UTC (rev 86966)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 15:30:43 UTC (rev 86967)
@@ -2,11 +2,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <!--
- *************************************************************************************** * * * The Testsuite module provides the test artifacts that can be reused by
- the various * * supported OSGi Frameworks. The tests are not run as part of the Testsuite module. * * *
- ***************************************************************************************
- -->
<name>JBossOSGi - Testsuite</name>
<description>JBossOSGi - Testsuite</description>
@@ -64,46 +59,6 @@
</testResources>
<plugins>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>testsuite</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>scripts/assembly-testsuite.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>target/${project.artifactId}-${project.version}.zip
- </file>
- <type>zip</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -122,17 +77,75 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
</plugins>
</build>
<profiles>
+
<!--
+ Name: framework-any
+ Descr: Create the testsuite.zip and skip tests if there is a framework specified
+ -->
+ <profile>
+ <id>framework-any</id>
+ <activation>
+ <property>
+ <name>framework</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>testsuite</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>scripts/assembly-testsuite.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>target/${project.artifactId}-${project.version}.zip
+ </file>
+ <type>zip</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
Name: framework-default
Descr: Setup for default framework integration testing
-->
@@ -156,16 +169,6 @@
<classifier>config</classifier>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>false</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
</profile>
<!--
@@ -189,8 +192,6 @@
<exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
- <!-- [JBOSGI-36] Bundle classes leak into system classloader -->
- <exclude>org/jboss/test/osgi/jbosgi36/*TestCase.java</exclude>
<!-- [JBOSGI-39] Bundle gets wired to an already uninstalled bundle -->
<exclude>org/jboss/test/osgi/jbosgi39/*TestCase.java</exclude>
</excludes>
16 years, 8 months
JBoss-OSGI SVN: r86950 - projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-04-08 06:00:07 -0400 (Wed, 08 Apr 2009)
New Revision: 86950
Modified:
projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml
Log:
Remove publishers
Modified: projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml
===================================================================
--- projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml 2009-04-08 09:57:31 UTC (rev 86949)
+++ projects/jboss-osgi/trunk/build/hudson/hudson-home/jobs/jbossosgi-embedded/config.xml 2009-04-08 10:00:07 UTC (rev 86950)
@@ -32,19 +32,6 @@
<usePrivateRepository>false</usePrivateRepository>
<ignoreUpstremChanges>true</ignoreUpstremChanges>
<reporters/>
- <publishers class="vector">
- <hudson.tasks.JavadocArchiver>
- <javadocDir>jboss-osgi/runtime/spi/target/apidocs</javadocDir>
- <keepAll>false</keepAll>
- </hudson.tasks.JavadocArchiver>
- <hudson.tasks.junit.JUnitResultArchiver>
- <testResults>jboss-osgi/**/target/surefire-reports/TEST-*.xml</testResults>
- </hudson.tasks.junit.JUnitResultArchiver>
- <hudson.tasks.Mailer>
- <recipients>@hudson.mail.recipients@</recipients>
- <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
- <sendToIndividuals>true</sendToIndividuals>
- </hudson.tasks.Mailer>
- </publishers>
+ <publishers/>
<buildWrappers/>
</maven2-moduleset>
\ No newline at end of file
16 years, 8 months