[infinispan-issues] [JBoss JIRA] Created: (ISPN-1298) Configure fork=once so that TRACE logs can be gathered more easily

Galder Zamarreño (JIRA) jira-events at lists.jboss.org
Tue Aug 2 12:24:23 EDT 2011


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
             Fix For: 5.2.0.FINAL


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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list