Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x fbe008ec5 -> 09be233c3


CAMEL-10407: camel-example-loan-broker : target directory is cleaned while 
testing so test are failing


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/09be233c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/09be233c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/09be233c

Branch: refs/heads/camel-2.18.x
Commit: 09be233c3eec43640e9342e8a81f7fbc91d8fafb
Parents: fbe008e
Author: lburgazzoli <lburgazz...@gmail.com>
Authored: Fri Oct 21 12:17:26 2016 +0200
Committer: lburgazzoli <lburgazz...@gmail.com>
Committed: Fri Oct 21 12:23:01 2016 +0200

----------------------------------------------------------------------
 examples/camel-example-loan-broker/pom.xml      |  1 +
 .../loanbroker/queue/version/JmsBroker.java     |  6 ++--
 .../src/test/resources/log4j2.properties        | 29 ++++++++++++++++++++
 3 files changed, 33 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/09be233c/examples/camel-example-loan-broker/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-loan-broker/pom.xml 
b/examples/camel-example-loan-broker/pom.xml
index d380b04..7299910 100644
--- a/examples/camel-example-loan-broker/pom.xml
+++ b/examples/camel-example-loan-broker/pom.xml
@@ -167,6 +167,7 @@
         <configuration>
           <mainClass>${target.main.class}</mainClass>
           <includePluginDependencies>false</includePluginDependencies>
+          <classpathScope>runtime</classpathScope>
           <systemProperties>
             <property>
               <key>java.util.logging.config.file</key>

http://git-wip-us.apache.org/repos/asf/camel/blob/09be233c/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/JmsBroker.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/JmsBroker.java
 
b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/JmsBroker.java
index c5f64a7..5bf4e20 100644
--- 
a/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/JmsBroker.java
+++ 
b/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/JmsBroker.java
@@ -75,8 +75,8 @@ public final class JmsBroker {
             try {  
                 BrokerService broker = new BrokerService();
                 synchronized (this) {                                     
-                    broker.setPersistenceAdapter(new 
MemoryPersistenceAdapter());                    
-                    broker.setTmpDataDirectory(new File("./target"));
+                    broker.setPersistenceAdapter(new 
MemoryPersistenceAdapter());
+                    broker.setTmpDataDirectory(new 
File(System.getProperty("broker.tmp.datadir", "./target/broker-tmp")));
                     broker.addConnector(brokerUrl);
                     broker.start();
                     Thread.sleep(200);
@@ -86,7 +86,7 @@ public final class JmsBroker {
                     while (!shutdownBroker) {
                         wait(1000);
                     }
-                }                
+                }
                 broker.stop();              
             } catch (Exception e) {
                 exception = e;

http://git-wip-us.apache.org/repos/asf/camel/blob/09be233c/examples/camel-example-loan-broker/src/test/resources/log4j2.properties
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-loan-broker/src/test/resources/log4j2.properties 
b/examples/camel-example-loan-broker/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..c6d2618
--- /dev/null
+++ b/examples/camel-example-loan-broker/src/test/resources/log4j2.properties
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-example-loan-broker-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
+

Reply via email to