You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/04/30 01:26:10 UTC

[jira] Updated: (MPTEST-30) Add support for forkmode

The following issue has been updated:

    Updater: Ben Walding (mailto:jakarta@walding.com)
       Date: Thu, 29 Apr 2004 7:25 PM
    Changes:
             priority changed from Major
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPTEST-30&page=history

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPTEST-30

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPTEST-30
    Summary: Add support for forkmode
       Type: New Feature

     Status: Open
   Priority: Minor

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-test-plugin

   Assignee: Jason van Zyl
   Reporter: Ben Walding

    Created: Thu, 29 Apr 2004 7:24 PM
    Updated: Thu, 29 Apr 2004 7:25 PM

Description:
Once a release of ant actually has this option, we really should support the forkmode option that Stephen Bodewig added.


>From the blog entry: 
http://stefanbodewig.blogger.de/stories/91862/



Ant's <junit> task knows two modes of operation. Run all tests inside the same Java VM that is executing Ant or fork a new Java VM for each JUnit test case class. 

In general, forking a new VM is recommended since it isolates your test from Ant's environment (which contains a lot of libraries on the classloader, in particular XML related classes) but it becomes really slow because of the big overhead associated with starting new Java VMs. 

A few minutes ago I've committed a change to the task that adds a new attribute, forkmode. If you set it to "once", Ant will fork a single Java VM for all your tests classes. The old behavior is forkmode="perTest" and we also have "perBatch" that generates a separate Java VM for each <batchtest> element. I expect this change to go into Ant 1.6.2 (no release date scheduled, yet). 

The run-times for Ant's own test-suite on my machine show what can be gained by this: 

un-forked: 7 minutes 39 seconds 
forked - mode perTest: 16 minutes 2 seconds 
forked - mode once: 8 minutes 36 seconds 
As usual I'm not sure about the name of the attribute. Suggestions are welcome. Update the attribute's name has changed from forkstyle to forkmode. 

So now I'm waiting for the next Gump run to show how many projects I've broken with this change ;-) 


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org