[infinispan-issues] [JBoss JIRA] (ISPN-1298) Configure fork=once so that TRACE logs can be gathered more easily
Galder Zamarreño (Updated) (JIRA)
jira-events at lists.jboss.org
Mon Nov 28 07:07:40 EST 2011
[ https://issues.jboss.org/browse/ISPN-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder Zamarreño updated ISPN-1298:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/680
> Configure fork=once so that TRACE logs can be gathered more easily
> ------------------------------------------------------------------
>
> Key: ISPN-1298
> URL: https://issues.jboss.org/browse/ISPN-1298
> Project: Infinispan
> Issue Type: Enhancement
> Components: Test Suite
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Minor
> Labels: log4j, logging
> Fix For: 5.1.0.CR1
>
>
> We currently run our testsuite with fork=none which causes us some small issues:
> - First, we're exposed to whatever system properties Maven might use internally which could impact our build.
> - Secondly, it makes it difficult to have per-project log4j settings that are not hardcoded in the source code.
> So, what is suggested here is that we switch to fork=once so that each module's testsuite runs in a different JVM. The overhead of this is apparently pretty small (needs double checking).
> In terms of logging, this potentially enables each module to have its own 'trace-enabling' profile pointing to its own TRACE enabled log4j file, making it quite easy for each module to define what TRACE is relevant for each. For example:
> {code}
> <project>
> <profiles>
> <profile>
> <id>trace-tests</id>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemPropertyVariables>
> <log4j.configuration>${basedir}/src/test/trace/log4j.xml</log4j.configuration>
> </systemPropertyVariables>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
> </profiles>
> </project>
> {code}
> This has another advantage which is allowing us to override the log output directory selectively which is handy in a CI environment such as CloudBees:
> - First, set the logs location to be dependant on another system property, i.e.:
> {code}location=${log4j.outputDirectory}/infinispan.log{code}
> - And then, selectively change it:
> {code}<systemPropertyVariables>
> <log4j.configuration>${basedir}/src/test/trace/log4j.xml</log4j.configuration>
> <log4j.outputDirectory>${project.build.directory}/test-logs</log4j.outputDirectory>
> </systemPropertyVariables>{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list