You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2014/02/13 22:30:23 UTC

svn commit: r1568043 - in /servicemix/smx5/trunk: ./ itests/ itests/src/test/scala/org/apache/servicemix/itests/

Author: gertv
Date: Thu Feb 13 21:30:23 2014
New Revision: 1568043

URL: http://svn.apache.org/r1568043
Log:
SM-2195: Upgrade to Pax Exam 3.4.0

Modified:
    servicemix/smx5/trunk/itests/pom.xml
    servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/BasicAssemblyTests.scala
    servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
    servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestConfigurations.scala
    servicemix/smx5/trunk/pom.xml

Modified: servicemix/smx5/trunk/itests/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/itests/pom.xml?rev=1568043&r1=1568042&r2=1568043&view=diff
==============================================================================
--- servicemix/smx5/trunk/itests/pom.xml (original)
+++ servicemix/smx5/trunk/itests/pom.xml Thu Feb 13 21:30:23 2014
@@ -49,11 +49,6 @@
         <version>${scala.bundle.version}</version>
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>org.apache.karaf.tooling.exam</groupId>
-        <artifactId>org.apache.karaf.tooling.exam.container</artifactId>
-        <version>${karaf.version}</version>
-      </dependency>
 
       <dependency>
         <groupId>junit</groupId>
@@ -75,8 +70,25 @@
 
       <dependency>
         <groupId>org.ops4j.pax.exam</groupId>
+        <artifactId>pax-exam-container-karaf</artifactId>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.ops4j.pax.exam</groupId>
         <artifactId>pax-exam-junit4</artifactId>
-        <version>${pax-exam-version}</version>
+        <scope>test</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>org.ops4j.pax.url</groupId>
+        <artifactId>pax-url-mvn</artifactId>
+        <scope>test</scope>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-atinject_1.0_spec</artifactId>
+        <scope>provided</scope>
       </dependency>
 
       <dependency>
@@ -127,6 +139,8 @@
     </dependencies>
 
   <build>
+    <sourceDirectory>src/main/scala</sourceDirectory>
+    <testSourceDirectory>src/test/scala</testSourceDirectory>
     <plugins>
       <plugin>
         <groupId>org.apache.servicemix.tooling</groupId>
@@ -149,8 +163,6 @@
         <configuration>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${settings.localRepository}</argLine>
-          <!-- SM-2232: hangs in integration tests -->
-          <skipExec>true</skipExec>
         </configuration>
       </plugin>
 

Modified: servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/BasicAssemblyTests.scala
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/BasicAssemblyTests.scala?rev=1568043&r1=1568042&r2=1568043&view=diff
==============================================================================
--- servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/BasicAssemblyTests.scala (original)
+++ servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/BasicAssemblyTests.scala Thu Feb 13 21:30:23 2014
@@ -16,16 +16,14 @@
  */
 package org.apache.servicemix.itests;
 
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.ExamReactorStrategy;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactorFactory
-
+import org.junit.Test
+import org.junit.runner.RunWith
 import org.junit.Assert._
 import io.Source
 import org.osgi.framework.Bundle
+import org.ops4j.pax.exam.spi.reactors.{PerClass, ExamReactorStrategy}
+import org.ops4j.pax.exam.junit.PaxExam
+import org.ops4j.pax.exam.Configuration
 
 /**
  * A set of quick sanity checks to be run for all three types of container packaging we offer (default, minimal and full)
@@ -53,8 +51,8 @@ trait BasicAssemblyTests { self: Integra
 
 }
 
-@RunWith(classOf[JUnit4TestRunner])
-@ExamReactorStrategy(Array(classOf[EagerSingleStagedReactorFactory]))
+@RunWith(classOf[PaxExam])
+@ExamReactorStrategy(Array(classOf[PerClass]))
 class MinimalAssemblyTest extends IntegrationTestSupport with BasicAssemblyTests {
 
   @Configuration
@@ -63,8 +61,8 @@ class MinimalAssemblyTest extends Integr
 
 }
 
-@RunWith(classOf[JUnit4TestRunner])
-@ExamReactorStrategy(Array(classOf[EagerSingleStagedReactorFactory]))
+@RunWith(classOf[PaxExam])
+@ExamReactorStrategy(Array(classOf[PerClass]))
 class DefaultAssemblyTest extends IntegrationTestSupport with BasicAssemblyTests {
 
   @Configuration
@@ -72,8 +70,8 @@ class DefaultAssemblyTest extends Integr
 
 }
 
-@RunWith(classOf[JUnit4TestRunner])
-@ExamReactorStrategy(Array(classOf[EagerSingleStagedReactorFactory]))
+@RunWith(classOf[PaxExam])
+@ExamReactorStrategy(Array(classOf[PerClass]))
 class FullAssemblyTest extends IntegrationTestSupport with BasicAssemblyTests {
 
   @Configuration

Modified: servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala?rev=1568043&r1=1568042&r2=1568043&view=diff
==============================================================================
--- servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala (original)
+++ servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/ExamplesIntegrationTests.scala Thu Feb 13 21:30:23 2014
@@ -16,19 +16,18 @@
  */
 package org.apache.servicemix.itests
 
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.ExamReactorStrategy;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactorFactory
+import org.junit.runner.RunWith
 import org.junit.{Ignore, Test}
 import org.apache.camel.{Exchange, Processor}
+import org.ops4j.pax.exam.spi.reactors.{PerClass, ExamReactorStrategy}
+import org.ops4j.pax.exam.Configuration
+import org.ops4j.pax.exam.junit.PaxExam
 
 /**
  * Base configuration for all examples' integration tests
  */
-@RunWith(classOf[JUnit4TestRunner])
-@ExamReactorStrategy(Array(classOf[EagerSingleStagedReactorFactory]))
+@RunWith(classOf[PaxExam])
+@ExamReactorStrategy(Array(classOf[PerClass]))
 abstract class ExamplesIntegrationTests extends IntegrationTestSupport with CamelTestSupport {
 
   @Configuration
@@ -39,9 +38,10 @@ abstract class ExamplesIntegrationTests 
 /**
  * Tests for the ActiveMQ examples
  */
+@Ignore("Example currently does not install, cfr. https://issues.apache.org/jira/browse/SM-2183")
 class ActiveMQExamplesTest extends ExamplesIntegrationTests {
+
   @Test
-  @Ignore("Example currently does not install, cfr. https://issues.apache.org/jira/browse/SM-2183")
   def testActiveMQCamelBlueprintExample = testWithFeature("examples-activemq-camel-blueprint") {
     expect {
       logging.containsMessage(line => line.contains("ActiveMQ-Blueprint-Example set body"))
@@ -52,10 +52,10 @@ class ActiveMQExamplesTest extends Examp
 /**
  * Tests for the Activiti examples
  */
+@Ignore("SM-2234: Activiti itest fails - runs same test twice?")
 class ActivitiExamplesTest extends ExamplesIntegrationTests {
 
   @Test
-  @Ignore("This test intermittently seems to lock up the test container")
   def testActivitiCamelExample = testWithFeature("examples-activiti-camel") {
     val orderId = "001"
 
@@ -111,7 +111,6 @@ class CamelExamplesTest extends Examples
 /**
  * Tests for the CXF examples
  */
-@Ignore("https://issues.apache.org/jira/browse/SM-2232")
 class CxfExamplesTest extends ExamplesIntegrationTests {
   @Test
   def testCxfJaxRsExample = testWithFeature("examples-cxf-jaxrs", "camel-http") {

Modified: servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestConfigurations.scala
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestConfigurations.scala?rev=1568043&r1=1568042&r2=1568043&view=diff
==============================================================================
--- servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestConfigurations.scala (original)
+++ servicemix/smx5/trunk/itests/src/test/scala/org/apache/servicemix/itests/IntegrationTestConfigurations.scala Thu Feb 13 21:30:23 2014
@@ -18,7 +18,7 @@ package org.apache.servicemix.itests
 
 import scala.Array
 import org.ops4j.pax.exam.CoreOptions._
-import org.apache.karaf.tooling.exam.options.KarafDistributionOption._
+import org.ops4j.pax.exam.karaf.options.KarafDistributionOption._
 import scala.Some
 import java.io.File
 
@@ -53,9 +53,10 @@ trait IntegrationTestConfigurations {
     Array(
       karafDistributionConfiguration().
         frameworkUrl(
-        maven().groupId("org.apache.servicemix").artifactId(artifact).`type`("tar.gz").versionAsInProject()).
+          maven().groupId("org.apache.servicemix").artifactId(artifact).`type`("tar.gz").versionAsInProject()).
         karafVersion("2.3.1").name("Apache ServiceMix (${name})").
-        unpackDirectory(new File(s"target/pax-exam/${artifact}")),
+        unpackDirectory(new File(s"target/pax-exam/${artifact}")).
+        useDeployFolder(false),
       keepRuntimeFolder(),
       systemProperty("org.ops4j.pax.url.mvn.localRepository").value(LOCAL_REPOSITORY),
       // TODO: investigate why we need this to get Pax Logging going again

Modified: servicemix/smx5/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/pom.xml?rev=1568043&r1=1568042&r2=1568043&view=diff
==============================================================================
--- servicemix/smx5/trunk/pom.xml (original)
+++ servicemix/smx5/trunk/pom.xml Thu Feb 13 21:30:23 2014
@@ -150,6 +150,7 @@
         <geronimo-saaj.version>1.0.0</geronimo-saaj.version>
         <geronimo-servlet.version>1.1.2</geronimo-servlet.version>
         <geronimo-ws-metadata.version>1.1.3</geronimo-ws-metadata.version>
+        <geronimo-atinject.version>1.0</geronimo-atinject.version>
 
         <!-- ServiceMix Bundles -->
         <abdera.bundle.version>0.4.0-incubating_4</abdera.bundle.version>
@@ -238,6 +239,9 @@
         <mongodb.version>2.11.2</mongodb.version>
         <mybatis.version>3.1.1</mybatis.version>
         <pax.tinybundle.version>1.0.0</pax.tinybundle.version>
+        <pax.swissbox.version>1.7.0</pax.swissbox.version>
+        <pax.exam.version>3.4.0</pax.exam.version>
+        <pax.url.version>1.3.6</pax.url.version>
         <pojosr.version>0.2.1</pojosr.version>
         <postgresql.version>9.1-901</postgresql.version>
         <scalatest.version>1.9.1</scalatest.version>
@@ -298,6 +302,11 @@
                <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
                <version>${geronimo-ws-metadata.version}</version>
            </dependency>
+           <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-atinject_1.0_spec</artifactId>
+                <version>${geronimo-atinject.version}</version>
+           </dependency>
 
            <!-- Spring -->
            <dependency>
@@ -711,6 +720,72 @@
                <artifactId>jetty-jmx</artifactId>
                <version>${jetty.version}</version>
            </dependency>
+           <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam</artifactId>
+                <version>${pax.exam.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam-container-karaf</artifactId>
+                <version>${pax.exam.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam-container-remote</artifactId>
+                <version>${pax.exam.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam-spi</artifactId>
+                <version>${pax.exam.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam-container-rbc</artifactId>
+                <version>${pax.exam.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam-container-rbc-client</artifactId>
+                <version>${pax.exam.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>pax-exam-junit4</artifactId>
+                <version>${pax.exam.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.swissbox</groupId>
+                <artifactId>pax-swissbox-bnd</artifactId>
+                <version>${pax.swissbox.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.swissbox</groupId>
+                <artifactId>pax-swissbox-lifecycle</artifactId>
+                <version>${pax.swissbox.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.swissbox</groupId>
+                <artifactId>pax-swissbox-property</artifactId>
+                <version>${pax.swissbox.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.swissbox</groupId>
+                <artifactId>pax-swissbox-tracker</artifactId>
+                <version>${pax.swissbox.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.url</groupId>
+                <artifactId>pax-url-mvn</artifactId>
+                <version>${pax.url.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.url</groupId>
+                <artifactId>pax-url-commons</artifactId>
+                <version>${pax.url.version}</version>
+            </dependency>
        </dependencies>
     </dependencyManagement>