[jboss-cvs] JBossAS SVN: r88362 - in projects/jboss-osgi/trunk: spi/src/main/java/org/jboss/osgi/spi/testing and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 7 10:00:45 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-05-07 10:00:45 -0400 (Thu, 07 May 2009)
New Revision: 88362
Added:
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/ConfigAdminCapability.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java
Removed:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java
Modified:
projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/EmbeddedRuntime.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteRuntime.java
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
Log:
Migrate HttpService test - WIP
Modified: projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-05-07 14:00:45 UTC (rev 88362)
@@ -174,7 +174,6 @@
<include name="jboss-vfs.jar" />
<include name="log4j.jar" />
<include name="org.apache.felix.framework.jar" />
- <include name="org.osgi.core.jar" />
</fileset>
<!-- JBossOSGi Bundles -->
Added: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/ConfigAdminCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/ConfigAdminCapability.java (rev 0)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/ConfigAdminCapability.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -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.osgi.spi.testing;
+
+//$Id$
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class ConfigAdminCapability extends Capability
+{
+ public ConfigAdminCapability()
+ {
+ addBundle("bundles/org.apache.felix.metatype.jar");
+ addBundle("bundles/org.apache.felix.configadmin.jar");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/ConfigAdminCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/EmbeddedRuntime.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/EmbeddedRuntime.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -170,10 +170,9 @@
public InitialContext getInitialContext() throws NamingException
{
Hashtable env = new Hashtable();
- String bindAddress = System.getProperty("jboss.bind.address", "localhost");
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
- env.put("java.naming.provider.url", "jnp://" + bindAddress + ":1199");
+ env.put("java.naming.provider.url", "jnp://" + getServerHost() + ":1199");
return new InitialContext(env);
}
Added: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java (rev 0)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -0,0 +1,43 @@
+/*
+ * 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.testing;
+
+import java.util.Properties;
+
+//$Id$
+
+/**
+ * [TODO]
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class HttpCapability extends Capability
+{
+ public HttpCapability()
+ {
+ Properties props = getProperties();
+ props.setProperty("org.osgi.service.http.port", "8090");
+
+ addBundle("bundles/org.apache.felix.http.jetty.jar");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/HttpCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiRuntime.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -54,6 +54,8 @@
MBeanServerConnection getMBeanServer();
+ String getServerHost();
+
void startLogEntryTracking(LogEntryCache logEntryCache);
void stopLogEntryTracking();
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTest.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -27,6 +27,7 @@
import junit.framework.TestCase;
import org.jboss.logging.Logger;
+import org.jboss.osgi.spi.testing.internal.OSGiRuntimeImpl;
import org.jboss.virtual.VFS;
/**
@@ -80,7 +81,7 @@
return helper.getDefaultRuntime();
}
- protected EmbeddedRuntime getEmbeddedRuntime()
+ protected OSGiRuntimeImpl getEmbeddedRuntime()
{
return helper.getEmbeddedRuntime();
}
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestHelper.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -27,6 +27,7 @@
import org.jboss.osgi.spi.framework.OSGiBootstrap;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
+import org.jboss.osgi.spi.testing.internal.OSGiRuntimeImpl;
/**
* An OSGi Test Helper
@@ -75,7 +76,7 @@
return runtime;
}
- public EmbeddedRuntime getEmbeddedRuntime()
+ public OSGiRuntimeImpl getEmbeddedRuntime()
{
return new EmbeddedRuntime(this);
}
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/OSGiTestSetup.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -28,6 +28,7 @@
import junit.framework.TestSuite;
import org.jboss.logging.Logger;
+import org.jboss.osgi.spi.testing.internal.OSGiRuntimeImpl;
/**
* An OSGi Test Setup
@@ -69,7 +70,7 @@
return helper.getDefaultRuntime();
}
- protected EmbeddedRuntime getEmbeddedRuntime()
+ protected OSGiRuntimeImpl getEmbeddedRuntime()
{
return helper.getEmbeddedRuntime();
}
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteRuntime.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/RemoteRuntime.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -71,6 +71,8 @@
super(helper);
// Initialize the ignored capabilities
+ ignoredCaps.add(ConfigAdminCapability.class);
+ ignoredCaps.add(HttpCapability.class);
ignoredCaps.add(JNDICapability.class);
ignoredCaps.add(JMXCapability.class);
ignoredCaps.add(MicrocontainerCapability.class);
Modified: projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java
===================================================================
--- projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/testing/internal/OSGiRuntimeImpl.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -100,4 +100,9 @@
removeCapability(capability);
}
}
+
+ public String getServerHost()
+ {
+ return System.getProperty("jboss.bind.address", "localhost");
+ }
}
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-05-07 14:00:45 UTC (rev 88362)
@@ -43,13 +43,28 @@
<artifactId>jboss-aop-mc-int</artifactId>
</dependency>
- <!-- Provided Dependencies -->
+ <!-- Bundle Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.configadmin</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.http.jetty</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.log</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-05-07 14:00:45 UTC (rev 88362)
@@ -15,7 +15,11 @@
<outputDirectory>bundles</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<includes>
+ <include>*:org.apache.felix.configadmin:jar</include>
+ <include>*:org.apache.felix.http.jetty:jar</include>
<include>*:org.apache.felix.log:jar</include>
+ <include>*:org.apache.felix.metatype:jar</include>
+ <include>*:org.osgi.compendium:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-logging:jar</include>
<include>*:jboss-osgi-remotelog:jar</include>
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -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.example.http;
-
-//$Id: HttpServiceRemoteTestCase.java 87330 2009-04-15 10:57:57Z thomas.diesler at jboss.com $
-
-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, "example/example-http.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("example-http", 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/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java (from rev 88323, projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceRemoteTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/http/HttpServiceTestCase.java 2009-05-07 14:00:45 UTC (rev 88362)
@@ -0,0 +1,111 @@
+/*
+ * 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: HttpServiceRemoteTestCase.java 87330 2009-04-15 10:57:57Z thomas.diesler at jboss.com $
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.jboss.osgi.spi.testing.AbstractBundle;
+import org.jboss.osgi.spi.testing.ConfigAdminCapability;
+import org.jboss.osgi.spi.testing.HttpCapability;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+import org.jboss.osgi.spi.testing.OSGiTest;
+import org.jboss.osgi.spi.testing.OSGiTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * 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 HttpServiceTestCase extends OSGiTest
+{
+ private static OSGiRuntime runtime;
+ private static AbstractBundle testBundle;
+
+ public static Test suite()
+ {
+ OSGiTestSetup testSetup = new OSGiTestSetup(HttpServiceTestCase.class)
+ {
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ runtime = getDefaultRuntime();
+ runtime.addCapability(new ConfigAdminCapability());
+ runtime.addCapability(new HttpCapability());
+ Thread.sleep(500);
+ testBundle = runtime.installBundle("example/example-http.jar");
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ testBundle.uninstall();
+ runtime.shutdown();
+ super.tearDown();
+ }
+ };
+ return testSetup;
+ }
+
+ public void testServletAccess() throws Exception
+ {
+ URL url = new URL("http://" + runtime.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://" + runtime.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://" + runtime.getServerHost() + ":8090/servlet?test=context");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("example-http", br.readLine());
+ }
+
+ public void testServletStartLevel() throws Exception
+ {
+ URL url = new URL("http://" + runtime.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://" + runtime.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
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-05-07 14:00:45 UTC (rev 88362)
@@ -19,10 +19,12 @@
org.jboss.virtual.plugins.registry, \
org.jboss.virtual.plugins.context.jar, \
org.jboss.virtual.plugins.vfs.helpers, \
- org.jboss.virtual.protocol
+ org.jboss.virtual.protocol, \
+ org.osgi.framework;version\=1.4
# Bundles that need to be installed with the Framework automatically
-# org.jboss.osgi.spi.framework.autoInstall=
+org.jboss.osgi.spi.framework.autoInstall=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2009-05-07 14:00:45 UTC (rev 88362)
@@ -43,9 +43,14 @@
<artifactId>jboss-aop-mc-int</artifactId>
</dependency>
- <!-- Provided Dependencies -->
+ <!-- Bundle Dependencies -->
<dependency>
<groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.http.jetty</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.log</artifactId>
<scope>provided</scope>
</dependency>
@@ -54,8 +59,6 @@
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
-
- <!-- Bundle DEpendencies -->
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>apache-xerces-bundle</artifactId>
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-05-07 13:57:53 UTC (rev 88361)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-05-07 14:00:45 UTC (rev 88362)
@@ -15,6 +15,7 @@
<outputDirectory>bundles</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<includes>
+ <include>*:org.apache.felix.http.jetty:jar</include>
<include>*:apache-xerces-bundle:jar</include>
<include>*:jaxb-bundle:jar</include>
<include>*:jboss-common-core-bundle:jar</include>
More information about the jboss-cvs-commits
mailing list