You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ks...@apache.org on 2016/04/21 23:06:22 UTC

servicemix git commit: [SM-2947] Migrate itests to java

Repository: servicemix
Updated Branches:
  refs/heads/master 6a8af4d0f -> 4c29dc296


[SM-2947] Migrate itests to java

 - itest for CXF WSN restored
 - itests for 'examples-camel-cxf-soap' and  'examples-camel-cxf-rest' features separated


Project: http://git-wip-us.apache.org/repos/asf/servicemix/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix/commit/4c29dc29
Tree: http://git-wip-us.apache.org/repos/asf/servicemix/tree/4c29dc29
Diff: http://git-wip-us.apache.org/repos/asf/servicemix/diff/4c29dc29

Branch: refs/heads/master
Commit: 4c29dc2963d6ad4fba9a85a3d719d78a23af1159
Parents: 6a8af4d
Author: Krzysztof Sobkowiak <kr...@gmail.com>
Authored: Thu Apr 21 23:04:14 2016 +0200
Committer: Krzysztof Sobkowiak <kr...@gmail.com>
Committed: Thu Apr 21 23:04:14 2016 +0200

----------------------------------------------------------------------
 .../servicemix/itests/ExamplesCXFTest.java      | 22 ++++++++++++++++++++
 .../servicemix/itests/ExamplesCamelTest.java    | 10 +++++++--
 2 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/servicemix/blob/4c29dc29/itests/src/test/java/org/apache/servicemix/itests/ExamplesCXFTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/servicemix/itests/ExamplesCXFTest.java b/itests/src/test/java/org/apache/servicemix/itests/ExamplesCXFTest.java
index 9610999..2599e30 100644
--- a/itests/src/test/java/org/apache/servicemix/itests/ExamplesCXFTest.java
+++ b/itests/src/test/java/org/apache/servicemix/itests/ExamplesCXFTest.java
@@ -16,18 +16,33 @@
  */
 package org.apache.servicemix.itests;
 
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
 import org.apache.servicemix.itests.base.Features;
 import org.apache.servicemix.itests.base.ServiceMixDistroTest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 
+
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class ExamplesCXFTest extends ServiceMixDistroTest {
 
+    @Configuration
+    public Option[] config() {
+        return options(composite(super.config()),
+                editConfigurationFilePut("etc/org.apache.cxf.wsn.cfg", "cxf.wsn.activemq.username", "smx"),
+                editConfigurationFilePut("etc/org.apache.cxf.wsn.cfg", "cxf.wsn.activemq.password", "smx")
+        );
+    }
+
     @Test
     public void testExampleCxfJAXRS() throws Exception {
         try (Features features = install("examples-cxf-jaxrs", "camel-http")) {
@@ -84,4 +99,11 @@ public class ExamplesCXFTest extends ServiceMixDistroTest {
         }
     }
 
+    @Test
+    public void testExampleCxfWsn() throws Exception {
+        try (Features features = install("examples-cxf-wsn-receive","examples-cxf-wsn-notifier")) {
+            log.expectContains("### YOU GOT MAIL ####\n");
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/servicemix/blob/4c29dc29/itests/src/test/java/org/apache/servicemix/itests/ExamplesCamelTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/servicemix/itests/ExamplesCamelTest.java b/itests/src/test/java/org/apache/servicemix/itests/ExamplesCamelTest.java
index 887b46a..da558a3 100644
--- a/itests/src/test/java/org/apache/servicemix/itests/ExamplesCamelTest.java
+++ b/itests/src/test/java/org/apache/servicemix/itests/ExamplesCamelTest.java
@@ -29,9 +29,15 @@ import org.ops4j.pax.exam.spi.reactors.PerClass;
 public class ExamplesCamelTest extends ServiceMixDistroTest {
 
     @Test
-    public void testExampleCamelCxf() throws Exception {
-        try (Features features = install("examples-camel-cxf-soap", "examples-camel-cxf-rest")) {
+    public void testExampleCamelCxfSoap() throws Exception {
+        try (Features features = install("examples-camel-cxf-soap")) {
             log.expectContains("Setting the server's publish address to be http://localhost:8989/soap");
+        }
+    }
+
+    @Test
+    public void testExampleCamelCxfRest() throws Exception {
+        try (Features features = install("examples-camel-cxf-rest")) {
             log.expectContains("Setting the server's publish address to be http://localhost:8989/rest");
         }
     }