You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by js...@apache.org on 2007/09/26 10:15:13 UTC
svn commit: r579503 - in /incubator/servicemix/trunk/samples/bridge: ./
bridge-sa-itest/ bridge-sa-itest/src/ bridge-sa-itest/src/test/
bridge-sa-itest/src/test/java/ bridge-sa-itest/src/test/java/org/
bridge-sa-itest/src/test/java/org/apache/ bridge-s...
Author: jstrachan
Date: Wed Sep 26 01:15:12 2007
New Revision: 579503
URL: http://svn.apache.org/viewvc?rev=579503&view=rev
Log:
added an initial attempt at an integration test for the bridge SA
Added:
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/pom.xml (with props)
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/IntegrationTest.java (with props)
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml (with props)
incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/log4j-tests.properties (with props)
Modified:
incubator/servicemix/trunk/samples/bridge/pom.xml
Added: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/pom.xml?rev=579503&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/pom.xml (added)
+++ incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/pom.xml Wed Sep 26 01:15:12 2007
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project 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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.servicemix.samples</groupId>
+ <artifactId>camel</artifactId>
+ <version>3.2-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.servicemix.samples.bridge</groupId>
+ <artifactId>bridge-sa-itest</artifactId>
+ <packaging>itest</packaging>
+ <name>ServiceMix :: Samples :: Bridge :: SA :: iTest</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.servicemix.samples.bridge</groupId>
+ <artifactId>bridge-sa</artifactId>
+ <type>zip</type>
+ <version>3.2-SNAPSHOT</version>
+ </dependency>
+
+ <!-- for testing -->
+ <dependency>
+ <groupId>org.apache.servicemix</groupId>
+ <artifactId>servicemix-core</artifactId>
+ <version>3.2-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- testing -->
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <!-- <version>${activemq-version}</version> -->
+ <version>5.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ <!-- <version>${camel-version}</version> -->
+ <version>1.1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring</artifactId>
+ <!-- <version>${camel-version}</version> -->
+ <version>1.1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jms</artifactId>
+ <!-- <version>${camel-version}</version> -->
+ <version>1.1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <!--
+ || lets enable the jbi-maven-plugin so that we auto-generate
+ || the META-INF/maven/dependencies.properties file
+ || so that we can auto-infer the versions of the various dependencies
+ -->
+ <plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>jbi-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <type>itest</type>
+ </configuration>
+ </plugin>
+
+ <!-- TODO we need to fork perTest for now to avoid kernel errors from ServiceMix -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <useFile>true</useFile>
+ <forkMode>perTest</forkMode>
+ <childDelegation>false</childDelegation>
+ <argLine>-Xmx512M</argLine>
+ <workingDirectory>${basedir}</workingDirectory>
+ <systemProperties>
+ <property>
+ <name>log4j.configuration</name>
+ <value>log4j-tests.properties</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/IntegrationTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/IntegrationTest.java?rev=579503&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/IntegrationTest.java (added)
+++ incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/IntegrationTest.java Wed Sep 26 01:15:12 2007
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.test;
+
+import junit.framework.TestCase;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class IntegrationTest extends TestCase {
+ protected ConfigurableApplicationContext applicationContext;
+
+ public void testDeploy() throws Exception {
+ Thread.sleep(50000);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ applicationContext = createApplicationContext();
+ assertNotNull("Could not create the applicationContext!", applicationContext);
+ applicationContext.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ if (applicationContext != null) {
+ applicationContext.stop();
+ }
+ super.tearDown();
+ }
+
+ protected ConfigurableApplicationContext createApplicationContext() throws Exception {
+ return new ClassPathXmlApplicationContext("integrationTest.xml");
+ }
+}
Propchange: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/java/org/apache/servicemix/test/IntegrationTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml?rev=579503&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml (added)
+++ incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml Wed Sep 26 01:15:12 2007
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sm="http://servicemix.apache.org/config/1.0"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://servicemix.apache.org/config/1.0 http://incubator.apache.org/servicemix/schema/core/servicemix-core.xsd
+ http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd
+ http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
+
+ <!-- Run a local ActiveMQ broker for testing -->
+ <broker xmlns="http://activemq.org/config/1.0" brokerName="localhost" persistent="false">
+ <transportConnectors>
+ <transportConnector name="openwire" uri="tcp://localhost:61616"/>
+ </transportConnectors>
+ </broker>
+
+
+ <!-- Deploy artifacts in ServiceMix -->
+ <sm:container generateRootDir="true" createJmxConnector="false">
+
+ <sm:deployments>
+ <sm:installSharedLibrary groupId="org.apache.servicemix" artifactId="servicemix-shared"/>
+ <sm:installComponent groupId="org.apache.servicemix" artifactId="servicemix-eip"/>
+ <sm:installComponent groupId="org.apache.servicemix" artifactId="servicemix-http"/>
+ <sm:installComponent groupId="org.apache.servicemix" artifactId="servicemix-jms"/>
+ <sm:installComponent groupId="org.apache.servicemix" artifactId="servicemix-saxon"/>
+ <sm:deployServiceAssembly groupId="org.apache.servicemix.samples.bridge" artifactId="bridge-sa"/>
+ </sm:deployments>
+
+ </sm:container>
+
+
+ <!--
+ || Lets test with some Enterprise Integration Patterns
+ || For more details see
+ ||
+ || http://activemq.apache.org/camel/enterprise-integration-patterns.html
+ -->
+ <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+
+ <!-- You can use a <package> element for each root package to search for Java routes -->
+ <package>org.foo.bar</package>
+
+ <!-- You can use Spring XML syntax to define the routes here using the <route> element -->
+ <route>
+ <from uri="activemq:example.A"/>
+ <to uri="activemq:example.B"/>
+ </route>
+ </camelContext>
+
+
+</beans>
Propchange: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/integrationTest.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/log4j-tests.properties
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/log4j-tests.properties?rev=579503&view=auto
==============================================================================
--- incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/log4j-tests.properties (added)
+++ incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/log4j-tests.properties Wed Sep 26 01:15:12 2007
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, stdout
+
+log4j.logger.org.springframework=INFO
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+
+#log4j.logger.org.apache.camel=DEBUG
+#log4j.logger.org.apache.servicemix=DEBUG
+
+# CONSOLE appender
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/camel-test.log
+log4j.appender.out.append=true
Propchange: incubator/servicemix/trunk/samples/bridge/bridge-sa-itest/src/test/resources/log4j-tests.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/servicemix/trunk/samples/bridge/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/bridge/pom.xml?rev=579503&r1=579502&r2=579503&view=diff
==============================================================================
--- incubator/servicemix/trunk/samples/bridge/pom.xml (original)
+++ incubator/servicemix/trunk/samples/bridge/pom.xml Wed Sep 26 01:15:12 2007
@@ -38,6 +38,7 @@
<module>bridge-xslt-su</module>
<module>bridge-jms-su</module>
<module>bridge-sa</module>
+ <module>bridge-sa-itest</module>
</modules>
<!-- Add ServiceMix repositories for snaphots and releases -->