cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1536400 - in /cxf/branches/2.7.x-fixes/services/xkms/xkms-itests: pom.xml src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java src/test/resources/etc/org.apache.cxf.xkms.cfg src/test/resources/etc/org.ops4j.pax.logging.cfg
Date Mon, 28 Oct 2013 16:50:42 GMT
Author: cschneider
Date: Mon Oct 28 16:50:41 2013
New Revision: 1536400

URL: http://svn.apache.org/r1536400
Log:
Improve logging in tests

Added:
    cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.ops4j.pax.logging.cfg
Modified:
    cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/pom.xml
    cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
    cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.apache.cxf.xkms.cfg

Modified: cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/pom.xml?rev=1536400&r1=1536399&r2=1536400&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/pom.xml (original)
+++ cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/pom.xml Mon Oct 28 16:50:41 2013
@@ -87,16 +87,7 @@
         		</exclusion>
         	</exclusions>
         </dependency>
-         
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
 
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-jdk14</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
@@ -106,6 +97,7 @@
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <systemPropertyVariables>
+                        <org.ops4j.pax.logging.DefaultServiceLog.level>WARN</org.ops4j.pax.logging.DefaultServiceLog.level>
                         <project.version>${project.version}</project.version>
                         <karaf.version>${karaf.version}</karaf.version>
                         <buildDirectory>${project.build.directory}</buildDirectory>

Modified: cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java?rev=1536400&r1=1536399&r2=1536400&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
(original)
+++ cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
Mon Oct 28 16:50:41 2013
@@ -24,7 +24,6 @@ import javax.inject.Inject;
 
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
 import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
 import org.ops4j.pax.exam.options.MavenUrlReference;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
@@ -34,10 +33,11 @@ import org.w3._2002._03.xkms_wsdl.XKMSPo
 
 import static org.ops4j.pax.exam.CoreOptions.maven;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile;
 
 @ExamReactorStrategy(PerClass.class)
@@ -71,7 +71,6 @@ public class BasicIntegrationTest {
         return new Option[] {
             karafDistributionConfiguration().frameworkUrl(karafUrl).karafVersion(karafVersion)
                 .unpackDirectory(new File("target/paxexam/unpack/")).useDeployFolder(false),
-            logLevel(LogLevel.INFO),
             systemProperty("java.awt.headless").value("true"),
 
             replaceConfigurationFile("data/xkms/certificates/trusted_cas/root.cer",
@@ -85,11 +84,14 @@ public class BasicIntegrationTest {
             replaceConfigurationFile("data/xkms/certificates/crls/wss40CACRL.cer",
                                      new File("src/test/resources/data/xkms/certificates/crls/wss40CACRL.cer")),
             replaceConfigurationFile("etc/org.apache.cxf.xkms.cfg", getConfigFile()),
-
+            replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", 
+                    new File("src/test/resources/etc/org.ops4j.pax.logging.cfg")),
             editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories",
REPOS), 
             editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port",
HTTP_PORT),
             editConfigurationFilePut("etc/org.apache.cxf.xkms.client.cfg", "xkms.endpoint",
XKMS_ENDPOINT),
-            features(xkmsFeatures, "cxf-xkms-service", "cxf-xkms-client"),
+            features(xkmsFeatures, "cxf-xkms-service", "cxf-xkms-client", "spring-dm"),
+            configureConsole().ignoreLocalConsole(),
+            keepRuntimeFolder()
             //CoreOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005")
         };
     }

Modified: cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.apache.cxf.xkms.cfg
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.apache.cxf.xkms.cfg?rev=1536400&r1=1536399&r2=1536400&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.apache.cxf.xkms.cfg
(original)
+++ cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.apache.cxf.xkms.cfg
Mon Oct 28 16:50:41 2013
@@ -26,6 +26,9 @@ xkms.certificate.repo=file
 # Disable Revocation
 xkms.enableRevocation=false
 
+# Do not log exceptions on server side
+xkms.logExceptions=false
+
 # Filesystem backend
 xkms.file.storageDir=data/xkms/certificates
 

Added: cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.ops4j.pax.logging.cfg
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.ops4j.pax.logging.cfg?rev=1536400&view=auto
==============================================================================
--- cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.ops4j.pax.logging.cfg
(added)
+++ cxf/branches/2.7.x-fixes/services/xkms/xkms-itests/src/test/resources/etc/org.ops4j.pax.logging.cfg
Mon Oct 28 16:50:41 2013
@@ -0,0 +1,25 @@
+# Root logger
+log4j.rootLogger=WARN, stdout, file
+log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+log4j.logger.org.apache.cxf.xkms=INFO
+log4j.logger.org.apache.cxf.xkms.x509.validator=WARN
+
+# Reduce noisy output
+log4j.logger.org.ops4j.pax.swissbox.bnd.BndUtils=ERROR
+
+# CONSOLE appender
+log4j.appender.stdout.threshold=INFO
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-50.50c | %m%n
+#log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-40.40c | %-3.3X{bundle.id}
- %-20.20X{bundle.name} | %m%n
+
+
+# File appender
+log4j.appender.file.threshold=DEBUG
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-50.50c | %m%n
+log4j.appender.file.file=${karaf.home}/log/tesb.log
+log4j.appender.file.append=true



Mime
View raw message