Author: veithen
Date: Thu Mar 13 22:17:41 2014
New Revision: 1577342
URL: http://svn.apache.org/r1577342
Log:
Enable HTTP in the OSGi tests.
Modified:
axis/axis2/java/core/trunk/modules/osgi-tests/pom.xml
axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
Modified: axis/axis2/java/core/trunk/modules/osgi-tests/pom.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi-tests/pom.xml?rev=1577342&r1=1577341&r2=1577342&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/osgi-tests/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/osgi-tests/pom.xml Thu Mar 13 22:17:41
2014
@@ -80,6 +80,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-testutils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
@@ -113,6 +118,11 @@
</dependencySet>
<artifacts>
<artifact>
+ <groupId>org.apache.felix</groupId>
+
<artifactId>org.apache.felix.http.jetty</artifactId>
+ <version>2.2.2</version>
+ </artifact>
+ <artifact>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
<version>1.6.2_6</version>
Modified:
axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java?rev=1577342&r1=1577341&r2=1577342&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
(original)
+++ axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
Thu Mar 13 22:17:41 2014
@@ -17,6 +17,7 @@
* under the License.
*/
import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.exam.CoreOptions.url;
@@ -28,6 +29,7 @@ import org.apache.axis2.osgi.module.Simp
import org.apache.axis2.osgi.service.Activator;
import org.apache.axis2.osgi.service.Calculator;
import org.apache.axis2.osgi.service.Version;
+import org.apache.axis2.testutils.PortAllocator;
import org.apache.felix.framework.FrameworkFactory;
import org.junit.Assert;
import org.junit.Test;
@@ -41,6 +43,7 @@ import org.osgi.framework.Constants;
public class OSGiTest {
@Test
public void test() throws Exception {
+ int httpPort = PortAllocator.allocatePort();
ExamSystem system = DefaultExamSystem.create(options(
url("link:classpath:META-INF/links/org.ops4j.pax.logging.api.link"),
url("link:classpath:META-INF/links/org.osgi.compendium.link"),
@@ -66,6 +69,7 @@ public class OSGiTest {
url("link:classpath:org.apache.neethi.link"),
url("link:classpath:org.apache.woden.core.link"),
url("link:classpath:org.apache.ws.xmlschema.core.link"),
+ url("link:classpath:org.apache.felix.http.jetty.link"),
url("link:classpath:org.apache.axis2.osgi.link"),
provision(bundle()
.add(Handler1.class)
@@ -83,7 +87,8 @@ public class OSGiTest {
.set(Constants.BUNDLE_SYMBOLICNAME, "version.service")
.set(Constants.BUNDLE_ACTIVATOR, Activator.class.getName())
.set(Constants.DYNAMICIMPORT_PACKAGE, "*")
- .build())));
+ .build()),
+
frameworkProperty("org.osgi.service.http.port").value(String.valueOf(httpPort))));
NativeTestContainer container = new NativeTestContainer(system, new
FrameworkFactory());
container.start();
try {