[jboss-cvs] JBossAS SVN: r87329 - in projects/jboss-osgi/trunk/testsuite: scripts and 14 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 15 06:34:22 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-04-15 06:34:21 -0400 (Wed, 15 Apr 2009)
New Revision: 87329
Added:
projects/jboss-osgi/trunk/testsuite/scripts/antrun-example-jars.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/MBeanServiceRemoteTestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/example-http.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/example-microcontainer.bnd
Removed:
projects/jboss-osgi/trunk/testsuite/scripts/assembly-testsuite.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/
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/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/resources/example/http/http-service.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/microcontainer-service.bnd
projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/
projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/
Modified:
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/example/http/bundle/EndpointService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/EndpointServlet.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/Foo.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/FooMBean.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/MBeanTestService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/ServiceActivator.java
Log:
Add http service example.
Add microcontainer service example.
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-15 10:13:16 UTC (rev 87328)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-15 10:34:21 UTC (rev 87329)
@@ -115,7 +115,8 @@
<tasks>
<property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
<property name="tests.output.dir" value="${project.build.directory}" />
- <ant antfile="scripts/antrun-test-jars.xml" target="build-test-jars" />
+ <ant antfile="scripts/antrun-example-jars.xml"/>
+ <ant antfile="scripts/antrun-test-jars.xml"/>
</tasks>
</configuration>
</execution>
Added: projects/jboss-osgi/trunk/testsuite/scripts/antrun-example-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/antrun-example-jars.xml (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/scripts/antrun-example-jars.xml 2009-04-15 10:34:21 UTC (rev 87329)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project default="build-example-jars">
+
+ <description>OSGi test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Init -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+
+ <!-- Property override when not called from maven -->
+ <property name="maven.runtime.classpath" value="/usr/java/bnd.jar" />
+ <property name="tests.output.dir" value="${basedir}/../target" />
+
+ <mkdir dir="${tests.output.dir}/test-libs/example" />
+ <property name="tests.classes.dir" value="${tests.output.dir}/test-classes" />
+ <property name="tests.resources.dir" value="${tests.output.dir}/test-classes" />
+
+ <taskdef resource="aQute/bnd/ant/taskdef.properties">
+ <classpath>
+ <pathelement path="${maven.runtime.classpath}" />
+ </classpath>
+ </taskdef>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-example-jars" depends="init" description="Build the test deployments">
+
+ <!-- Please add alphabetically -->
+
+ <!-- example/log -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-log.jar" files="${tests.resources.dir}/example/log/example-log.bnd" />
+
+ <!-- example/http -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-http.jar" files="${tests.resources.dir}/example/http/example-http.bnd" />
+
+ <!-- example/microcontainer -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-microcontainer.jar" files="${tests.resources.dir}/example/microcontainer/example-microcontainer.bnd" />
+
+ <!-- Please add alphabetically -->
+
+ </target>
+
+</project>
Property changes on: projects/jboss-osgi/trunk/testsuite/scripts/antrun-example-jars.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-15 10:13:16 UTC (rev 87328)
+++ projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-15 10:34:21 UTC (rev 87329)
@@ -42,9 +42,6 @@
<!-- Please add alphabetically -->
- <!-- example/log -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example/example-log-bundleA.jar" files="${tests.resources.dir}/example/log/example-log-bundleA.bnd" />
-
<!-- jbosgi36 -->
<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">
@@ -79,12 +76,6 @@
<!-- jbosgi41 -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi41-bundleA.jar" files="${tests.resources.dir}/jbosgi41/jbosgi41-bundleA.bnd" />
- <!-- http-service -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/http-service.jar" files="${tests.resources.dir}/service/http/http-service.bnd" />
-
- <!-- microcontainer-service -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/microcontainer-service.jar" files="${tests.resources.dir}/service/microcontainer/microcontainer-service.bnd" />
-
<!-- startlevel-service -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/startlevel-service.jar" files="${tests.resources.dir}/service/startlevel/startlevel-service.bnd" />
Deleted: projects/jboss-osgi/trunk/testsuite/scripts/assembly-testsuite.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/assembly-testsuite.xml 2009-04-15 10:13:16 UTC (rev 87328)
+++ projects/jboss-osgi/trunk/testsuite/scripts/assembly-testsuite.xml 2009-04-15 10:34:21 UTC (rev 87329)
@@ -1,18 +0,0 @@
-<assembly 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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>testsuite</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>src/test</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/test-libs</directory>
- <outputDirectory>/test-libs</outputDirectory>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java (from rev 87324, 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/example/http/HttpServiceRemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.example.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 at 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
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/EndpointService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointService.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/EndpointService.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.http.bundle;
+package org.jboss.test.osgi.example.http.bundle;
//$Id$
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/EndpointServlet.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/EndpointServlet.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/EndpointServlet.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.http.bundle;
+package org.jboss.test.osgi.example.http.bundle;
//$Id$
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/bundle/ServiceActivator.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/http/bundle/ServiceActivator.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.http.bundle;
+package org.jboss.test.osgi.example.http.bundle;
//$Id$
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceA.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.example.log.bundleA;
+package org.jboss.test.osgi.example.log.bundle;
//$Id$
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundleA/ServiceActivator.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceActivator.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.example.log.bundleA;
+package org.jboss.test.osgi.example.log.bundle;
//$Id$
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/MBeanServiceRemoteTestCase.java (from rev 87324, 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/example/microcontainer/MBeanServiceRemoteTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/MBeanServiceRemoteTestCase.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.example.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.example.microcontainer.bundle.FooMBean;
+import org.jboss.test.osgi.example.microcontainer.bundle.MBeanTestService;
+
+/**
+ * A test that deployes a bundle that registeres an MBean
+ *
+ * @author thomas.diesler at 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
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/Foo.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/Foo.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/Foo.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.microcontainer.bundle;
+package org.jboss.test.osgi.example.microcontainer.bundle;
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/FooMBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/FooMBean.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/FooMBean.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.microcontainer.bundle;
+package org.jboss.test.osgi.example.microcontainer.bundle;
//$Id$
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/MBeanTestService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/MBeanTestService.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/MBeanTestService.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.microcontainer.bundle;
+package org.jboss.test.osgi.example.microcontainer.bundle;
//$Id$
@@ -28,7 +28,7 @@
import org.jboss.osgi.spi.management.ObjectNameFactory;
import org.jboss.osgi.spi.service.microcontainer.MicrocontainerService;
-import org.jboss.test.osgi.service.microcontainer.bundle.Foo;
+import org.jboss.test.osgi.example.microcontainer.bundle.Foo;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.ServiceListener;
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/bundle/ServiceActivator.java 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/microcontainer/bundle/ServiceActivator.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.service.microcontainer.bundle;
+package org.jboss.test.osgi.example.microcontainer.bundle;
//$Id$
Deleted: 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/HttpServiceRemoteTestCase.java 2009-04-15 10:13:16 UTC (rev 87328)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/http/HttpServiceRemoteTestCase.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -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.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 at 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/microcontainer/MBeanServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanServiceRemoteTestCase.java 2009-04-15 10:13:16 UTC (rev 87328)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/service/microcontainer/MBeanServiceRemoteTestCase.java 2009-04-15 10:34:21 UTC (rev 87329)
@@ -1,52 +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 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 at 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
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http)
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/example-http.bnd (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/http-service.bnd)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/example-http.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/example-http.bnd 2009-04-15 10:34:21 UTC (rev 87329)
@@ -0,0 +1,9 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example/example-http.jar src/test/resources/example/http/example-http.bnd
+
+Bundle-SymbolicName: example-http
+Bundle-Activator: org.jboss.test.osgi.example.http.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.example.http.bundle
+Include-Resource: res/message.txt=message.txt
+
+# For some reason this does not work
+# Include-Resource: src/test/resources/service/http/message.txt
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/http-service.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/service/http/http-service.bnd 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/example/http/http-service.bnd 2009-04-15 10:34:21 UTC (rev 87329)
@@ -1,9 +0,0 @@
-# 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.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
-# Include-Resource: src/test/resources/service/http/message.txt
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log-bundleA.bnd 2009-04-15 10:13:16 UTC (rev 87328)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log-bundleA.bnd 2009-04-15 10:34:21 UTC (rev 87329)
@@ -1,6 +0,0 @@
-# bnd build -classpath target/test-classes -output target/test-libs/example-log-bundleA.jar src/test/resources/example/log/example-log-bundleA.bnd
-
-Bundle-SymbolicName: example-log-bundleA
-
-Bundle-Activator: org.jboss.test.osgi.example.log.bundleA.ServiceActivator
-Export-Package: org.jboss.test.osgi.example.log.bundleA
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log.bnd (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log-bundleA.bnd)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/example/log/example-log.bnd 2009-04-15 10:34:21 UTC (rev 87329)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example-log.jar src/test/resources/example/log/example-log.bnd
+
+Bundle-SymbolicName: example-log
+
+Bundle-Activator: org.jboss.test.osgi.example.log.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.example.log.bundle
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer)
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/example-microcontainer.bnd (from rev 87324, projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/example-microcontainer.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/example-microcontainer.bnd 2009-04-15 10:34:21 UTC (rev 87329)
@@ -0,0 +1,5 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example/example-microcontainer.jar src/test/resources/example/microcontainer/example-microcontainer.bnd
+
+Bundle-SymbolicName: example-microcontainer
+Bundle-Activator: org.jboss.test.osgi.example.microcontainer.bundle.ServiceActivator
+Export-Package: org.jboss.test.osgi.example.microcontainer.bundle
Deleted: projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/microcontainer-service.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd 2009-04-15 10:00:38 UTC (rev 87324)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/example/microcontainer/microcontainer-service.bnd 2009-04-15 10:34:21 UTC (rev 87329)
@@ -1,5 +0,0 @@
-# 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.bundle.ServiceActivator
-Export-Package: org.jboss.test.osgi.service.microcontainer.bundle
More information about the jboss-cvs-commits
mailing list