:) cool 2014-12-03 19:29 GMT+01:00 Jean-Baptiste Onofré <[email protected]>:
> Hi Achim, > > actually, I just aligned karaf-2.x with the other branches (master and > karaf-3.0.x, that use DEBUG for itests too). > > I agree to change to INFO to reduce the noise, I will do that on all > branches. > > Regards > JB > > > On 12/03/2014 11:36 AM, Achim Nierbeck wrote: > >> Hey JB, >> are you sure about the DEBUG log to be the default here ;) >> >> regards, Achim >> >> 2014-12-03 11:20 GMT+01:00 <[email protected]>: >> >> Repository: karaf >>> Updated Branches: >>> refs/heads/karaf-2.x ef93ea347 -> 4db9ddfdd >>> >>> >>> [KARAF-3339] Fix long delay in itests >>> >>> >>> Project: http://git-wip-us.apache.org/repos/asf/karaf/repo >>> Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/4db9ddfd >>> Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/4db9ddfd >>> Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/4db9ddfd >>> >>> Branch: refs/heads/karaf-2.x >>> Commit: 4db9ddfdd6c23b0c494906f4ee3b7ac811ef630b >>> Parents: ef93ea3 >>> Author: Jean-Baptiste Onofré <[email protected]> >>> Authored: Wed Dec 3 11:19:14 2014 +0100 >>> Committer: Jean-Baptiste Onofré <[email protected]> >>> Committed: Wed Dec 3 11:19:14 2014 +0100 >>> >>> ---------------------------------------------------------------------- >>> .../apache/karaf/itests/KarafTestSupport.java | 18 ++++++-- >>> .../resources/etc/org.ops4j.pax.logging.cfg | 46 >>> ++++++++++++++++++++ >>> 2 files changed, 60 insertions(+), 4 deletions(-) >>> ---------------------------------------------------------------------- >>> >>> >>> >>> http://git-wip-us.apache.org/repos/asf/karaf/blob/4db9ddfd/ >>> itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java >>> ---------------------------------------------------------------------- >>> diff --git >>> a/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java >>> b/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java >>> index c9fe6e2..526a50a 100644 >>> --- a/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java >>> +++ b/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java >>> @@ -16,6 +16,7 @@ package org.apache.karaf.itests; >>> import java.io.ByteArrayOutputStream; >>> import java.io.File; >>> import java.io.PrintStream; >>> +import java.net.URL; >>> import java.security.Principal; >>> import java.security.PrivilegedExceptionAction; >>> import java.util.Arrays; >>> @@ -63,7 +64,7 @@ import static >>> org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*; >>> >>> public class KarafTestSupport { >>> >>> - static final Long COMMAND_TIMEOUT = 10000L; >>> + static final Long COMMAND_TIMEOUT = 30000L; >>> static final Long SERVICE_TIMEOUT = 30000L; >>> >>> ExecutorService executor = Executors.newCachedThreadPool(); >>> @@ -80,6 +81,14 @@ public class KarafTestSupport { >>> return probe; >>> } >>> >>> + public File getConfigFile(String path) { >>> + URL res = this.getClass().getResource(path); >>> + if (res == null) { >>> + throw new RuntimeException("Config resource " + path + " not >>> found"); >>> + } >>> + return new File(res.getFile()); >>> + } >>> + >>> @Configuration >>> public Option[] config() { >>> return new Option[]{ >>> @@ -87,7 +96,8 @@ public class KarafTestSupport { >>> >>> karafDistributionConfiguration().frameworkUrl(maven(). >>> groupId("org.apache.karaf").artifactId("apache-karaf"). >>> versionAsInProject().type("tar.gz")) >>> >>> .karafVersion(MavenUtils.getArtifactVersion("org.apache.karaf", >>> "apache-karaf")).name("Apache Karaf").unpackDirectory(new >>> File("target/exam")), >>> keepRuntimeFolder(), >>> - logLevel(LogLevelOption.LogLevel.ERROR), >>> + logLevel(LogLevelOption.LogLevel.DEBUG), >>> + replaceConfigurationFile("etc/ >>> org.ops4j.pax.logging.cfg", >>> getConfigFile("/etc/org.ops4j.pax.logging.cfg")), >>> editConfigurationFilePut("etc/system.properties", >>> "hibernate3.version", System.getProperty("hibernate3.version")), >>> editConfigurationFilePut("etc/system.properties", >>> "hibernate42.version", System.getProperty("hibernate42.version")), >>> editConfigurationFilePut("etc/system.properties", >>> "hibernate43.version", System.getProperty("hibernate43.version")), >>> @@ -194,9 +204,9 @@ public class KarafTestSupport { >>> if (colonIndx > 0) { >>> String scope = command.substring(0, colonIndx); >>> String function = command.substring(colonIndx + 1); >>> - waitForService("(&(osgi.command.scope=" + scope + >>> ")(osgi.command.function=" + function + >>> ")(org.apache.karaf.service.guard.roles=*))", SERVICE_TIMEOUT); >>> + waitForService("(&(osgi.command.scope=" + scope + >>> ")(osgi.command.function=" + function + "))", SERVICE_TIMEOUT); >>> } else { >>> - waitForService("(&(osgi.command.function=" + command + >>> ")(org.apache.karaf.service.guard.roles=*))", SERVICE_TIMEOUT); >>> + waitForService("(osgi.command.function=" + command + >>> ")", >>> SERVICE_TIMEOUT); >>> } >>> } catch (Exception e) { >>> throw new RuntimeException(e); >>> >>> >>> http://git-wip-us.apache.org/repos/asf/karaf/blob/4db9ddfd/ >>> itests/src/test/resources/etc/org.ops4j.pax.logging.cfg >>> ---------------------------------------------------------------------- >>> diff --git a/itests/src/test/resources/etc/org.ops4j.pax.logging.cfg >>> b/itests/src/test/resources/etc/org.ops4j.pax.logging.cfg >>> new file mode 100644 >>> index 0000000..332eab1 >>> --- /dev/null >>> +++ b/itests/src/test/resources/etc/org.ops4j.pax.logging.cfg >>> @@ -0,0 +1,46 @@ >>> >>> +########################################################### >>> ##################### >>> +# >>> +# 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. >>> +# >>> >>> +########################################################### >>> ##################### >>> + >>> +# Root logger >>> +log4j.rootLogger=INFO, stdout, out, osgi:VmLogAppender >>> +log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer >>> + >>> +# Reduce noisy output >>> +log4j.logger.org.apache.aries.blueprint.container=WARN >>> +log4j.logger.org.apache.aries.blueprint.ext.PropertyPlaceholder=INFO >>> +log4j.logger.org.springframework=WARN >>> +log4j.logger.org.ops4j.pax.exam.invoker.junit.internal=WARN >>> +log4j.logger.org.apache.felix.fileinstall=WARN >>> +log4j.logger.org.apache.aries.jmx.core=WARN >>> +log4j.logger.org.ops4j.pax.swissbox.bnd.BndUtils=ERROR >>> + >>> +# CONSOLE appender >>> +log4j.appender.stdout.threshold=DEBUG >>> +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.out.threshold=DEBUG >>> +log4j.appender.out=org.apache.log4j.FileAppender >>> +log4j.appender.out.layout=org.apache.log4j.PatternLayout >>> +log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | >>> %-50.50c | %m%n >>> +log4j.appender.out.file=${karaf.home}/log/karaf.log >>> +log4j.appender.out.append=true >>> >>> >>> >> >> > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
