camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1330016 - in /camel/trunk/components/camel-cdi: pom.xml src/test/java/org/apache/camel/cdi/CamelCdiTestContainer.java
Date Tue, 24 Apr 2012 21:01:33 GMT
Author: hadrian
Date: Tue Apr 24 21:01:33 2012
New Revision: 1330016

URL: http://svn.apache.org/viewvc?rev=1330016&view=rev
Log:
CAMEL-5145. Use slf4j for logging in tests (keep them quiet)

Modified:
    camel/trunk/components/camel-cdi/pom.xml
    camel/trunk/components/camel-cdi/src/test/java/org/apache/camel/cdi/CamelCdiTestContainer.java

Modified: camel/trunk/components/camel-cdi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cdi/pom.xml?rev=1330016&r1=1330015&r2=1330016&view=diff
==============================================================================
--- camel/trunk/components/camel-cdi/pom.xml (original)
+++ camel/trunk/components/camel-cdi/pom.xml Tue Apr 24 21:01:33 2012
@@ -88,6 +88,12 @@
       <version>${deltaspike-version}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jul-to-slf4j</artifactId>
+      <version>${slf4j-version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <profiles>
@@ -134,7 +140,7 @@
         </dependency>
         <dependency>
             <groupId>org.jboss.weld.se</groupId>
-            <artifactId>weld-se</artifactId>
+            <artifactId>weld-se-core</artifactId>
             <version>${weld-version}</version>
             <scope>provided</scope>
         </dependency>

Modified: camel/trunk/components/camel-cdi/src/test/java/org/apache/camel/cdi/CamelCdiTestContainer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cdi/src/test/java/org/apache/camel/cdi/CamelCdiTestContainer.java?rev=1330016&r1=1330015&r2=1330016&view=diff
==============================================================================
--- camel/trunk/components/camel-cdi/src/test/java/org/apache/camel/cdi/CamelCdiTestContainer.java
(original)
+++ camel/trunk/components/camel-cdi/src/test/java/org/apache/camel/cdi/CamelCdiTestContainer.java
Tue Apr 24 21:01:33 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.cdi;
 
+import java.util.logging.LogManager;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.cdi.CdiCamelContext;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -23,6 +25,7 @@ import org.apache.deltaspike.cdise.api.C
 import org.apache.deltaspike.cdise.api.CdiContainerLoader;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.BeforeClass;
 
 /**
  * Base class for cdi tests.
@@ -31,6 +34,17 @@ public abstract class CamelCdiTestContai
 
     private CdiContainer cdiContainer;
 
+    /**
+     * Reset configuration of java util logging and forward it to slf4j.
+     * 
+     * @throws Exception In case of failures.
+     */
+    @BeforeClass
+    public static void before() throws Exception {
+        LogManager.getLogManager().reset();
+        org.slf4j.bridge.SLF4JBridgeHandler.install();
+    }
+
     @Before
     public void setUp() throws Exception {
         // set up CDI container before camel context start up
@@ -52,3 +66,4 @@ public abstract class CamelCdiTestContai
         return new CdiCamelContext();
     }
 }
+



Mime
View raw message