Author: davsclaus
Date: Wed Jan 12 14:07:09 2011
New Revision: 1058149

URL: http://svn.apache.org/viewvc?rev=1058149&view=rev
Log:
Fixed karaf test and added log4j logging file.

Added:
    camel/trunk/tests/camel-itest-karaf/src/test/resources/
    
camel/trunk/tests/camel-itest-karaf/src/test/resources/commons-logging.properties
    camel/trunk/tests/camel-itest-karaf/src/test/resources/log4j.properties
Modified:
    camel/trunk/tests/camel-itest-karaf/pom.xml
    
camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelSyslogTest.java
    
camel/trunk/tests/camel-itest-osgi/src/test/resources/commons-logging.properties

Modified: camel/trunk/tests/camel-itest-karaf/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/pom.xml?rev=1058149&r1=1058148&r2=1058149&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-karaf/pom.xml (original)
+++ camel/trunk/tests/camel-itest-karaf/pom.xml Wed Jan 12 14:07:09 2011
@@ -17,158 +17,170 @@
   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";>
+<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>
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.camel</groupId>
-    <artifactId>camel-parent</artifactId>
-    <version>2.6-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>camel-itest-karaf</artifactId>
-  <name>Camel :: Karaf Integration Tests</name>
-  <description>Performs Karaf compliance integration tests</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-container-default</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-junit-extender-impl</artifactId>
-      <scope>test</scope>
-    </dependency>
-       <dependency>
-               <groupId>org.ops4j.pax.swissbox</groupId>
-               <artifactId>pax-swissbox-tinybundles</artifactId>
-               <scope>test</scope>
-       </dependency>
-        <dependency>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>org.apache.felix.configadmin</artifactId>
-        <scope>test</scope>
-    </dependency> 
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <version>4.0.1</version>
-      <scope>test</scope>      
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-spring</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel.karaf</groupId>
-      <artifactId>apache-camel</artifactId>
-      <version>${version}</version>
-      <type>pom</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.5</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <!-- generate dependencies versions -->
-      <plugin>
-        <groupId>org.apache.servicemix.tooling</groupId>
-        <artifactId>depends-maven-plugin</artifactId>
-        <version>1.2</version>
-        <executions>
-          <execution>
-            <id>generate-depends-file</id>
-            <goals>
-              <goal>generate-depends-file</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <configuration>
-              <forkMode>pertest</forkMode>
-              
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
-              <redirectTestOutputToFile>true</redirectTestOutputToFile>
-              <argLine>-Xmx256m</argLine>
-              <includes>
-                 <include>**/*Test.*</include>
-              </includes>
-              <excludes>
-                  <!-- CXF test will hang with the Spring3, need to check Cxf 
feature with karaf later -->
-                  <exclude>**/*Cxf*.*</exclude>
-              </excludes>
-              <systemPropertyVariables>
-                  <springVersion>${spring-version}</springVersion>
-              </systemPropertyVariables>
-          </configuration>
-      </plugin>
-
-    </plugins>
-  </build>
-
-  <profiles>
-       <profile>
-        <id>ci-build-profile</id>
-        <activation>
-            <property>
-                <name>maven.repo.local</name>
-            </property>
-        </activation>
-        <build>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <configuration>
-                        <!--
-                            when the local repo location has been specified, 
we need to pass
-                            on this information to PAX mvn url
-                        -->
-                        
<argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <configuration>
-                        <excludes>
-                            <!-- TODO: temporary disable unit test to let TC 
not hang -->
-                            <exclude>**/*Test.*</exclude>
-                        </excludes>
-                        <systemPropertyVariables>
-                            <springVersion>${spring-version}</springVersion>
-                        </systemPropertyVariables>               
-                    </configuration>
-                </plugin>
-            </plugins>
-        </build>
-    </profile>
-</profiles>
+    <parent>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-parent</artifactId>
+        <version>2.6-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-itest-karaf</artifactId>
+    <name>Camel :: Karaf Integration Tests</name>
+    <description>Performs Karaf compliance integration tests</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit-extender-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.swissbox</groupId>
+            <artifactId>pax-swissbox-tinybundles</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.0.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-spring</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.karaf</groupId>
+            <artifactId>apache-camel</artifactId>
+            <version>${version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- test and logging -->
+        <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>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- generate dependencies versions -->
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>generate-depends-file</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <forkMode>pertest</forkMode>
+                    
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
+                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                    <argLine>-Xmx256m</argLine>
+                    <includes>
+                        <include>**/*Test.*</include>
+                    </includes>
+                    <excludes>
+                        <!-- CXF test will hang with the Spring3, need to 
check Cxf feature with karaf later -->
+                        <exclude>**/*Cxf*.*</exclude>
+                    </excludes>
+                    <systemPropertyVariables>
+                        <springVersion>${spring-version}</springVersion>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>ci-build-profile</id>
+            <activation>
+                <property>
+                    <name>maven.repo.local</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <!--
+                                when the local repo location has been 
specified, we need to pass
+                                on this information to PAX mvn url
+                            -->
+                            
<argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <excludes>
+                                <!-- TODO: temporary disable unit test to let 
TC not hang -->
+                                <exclude>**/*Test.*</exclude>
+                            </excludes>
+                            <systemPropertyVariables>
+                                
<springVersion>${spring-version}</springVersion>
+                            </systemPropertyVariables>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
 </project>

Modified: 
camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelSyslogTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelSyslogTest.java?rev=1058149&r1=1058148&r2=1058149&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelSyslogTest.java
 (original)
+++ 
camel/trunk/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelSyslogTest.java
 Wed Jan 12 14:07:09 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.itest.karaf;
 
+import org.apache.camel.model.DataFormatDefinition;
+import org.apache.camel.model.dataformat.SyslogDataFormat;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -27,9 +29,13 @@ public class CamelSyslogTest extends Abs
 
     public static final String COMPONENT = extractName(CamelSyslogTest.class);
 
+    protected DataFormatDefinition createDataformatDefinition(String format) {
+        return new SyslogDataFormat();
+    }
+
     @Test
     public void test() throws Exception {
-        testComponent(COMPONENT);
+        testDataFormat(COMPONENT);
     }
 
     @Configuration

Added: 
camel/trunk/tests/camel-itest-karaf/src/test/resources/commons-logging.properties
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/src/test/resources/commons-logging.properties?rev=1058149&view=auto
==============================================================================
--- 
camel/trunk/tests/camel-itest-karaf/src/test/resources/commons-logging.properties
 (added)
+++ 
camel/trunk/tests/camel-itest-karaf/src/test/resources/commons-logging.properties
 Wed Jan 12 14:07:09 2011
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
\ No newline at end of file

Added: camel/trunk/tests/camel-itest-karaf/src/test/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/src/test/resources/log4j.properties?rev=1058149&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-karaf/src/test/resources/log4j.properties 
(added)
+++ camel/trunk/tests/camel-itest-karaf/src/test/resources/log4j.properties Wed 
Jan 12 14:07:09 2011
@@ -0,0 +1,40 @@
+## ---------------------------------------------------------------------------
+## 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, out
+
+# Use the following line to turn on debug output for camel
+#log4j.logger.org.apache.camel=DEBUG
+
+#log4j.logger.org.ops4j.pax=DEBUG
+# is very noisy at INFO level
+log4j.logger.org.ops4j.io=WARN
+
+# CONSOLE appender not used by default
+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-itest-karaf-test.log
+log4j.appender.out.append=true

Modified: 
camel/trunk/tests/camel-itest-osgi/src/test/resources/commons-logging.properties
URL: 
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/resources/commons-logging.properties?rev=1058149&r1=1058148&r2=1058149&view=diff
==============================================================================
--- 
camel/trunk/tests/camel-itest-osgi/src/test/resources/commons-logging.properties
 (original)
+++ 
camel/trunk/tests/camel-itest-osgi/src/test/resources/commons-logging.properties
 Wed Jan 12 14:07:09 2011
@@ -1,2 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
 #org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
 org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
\ No newline at end of file


Reply via email to