You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/05/15 20:20:16 UTC
DO NOT REPLY [Bug 19964] New: -
system property for a default timeout for tests
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19964>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19964
system property for a default timeout for tests
Summary: system property for a default timeout for tests
Product: Ant
Version: 1.5.3
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: Other
Component: Optional Tasks
AssignedTo: dev@ant.apache.org
ReportedBy: mariano@fuegolabs.com
we already have a lots of <junit> tasks in our test system, and now we would
like to add a timeout, but since it is painfull to change and maintain a lot of
build files, it would be cool to have a property junit.default.timeout to set
the timeout for ALL tests that do not specify it explicitly.
the only change is in the class JUnitTask and is:
/**
* @return <tt>null</tt> if there is a timeout value, otherwise the
* watchdog instance.
*
* @since Ant 1.2
*/
protected ExecuteWatchdog createWatchdog() throws BuildException {
if (timeout == null){
String defaultTimeout =
getProject().getProperty("junit.default.timeout");
if (defaultTimeout == null) {
return null;
}
else {
log("using junit default timeout", Project.MSG_VERBOSE);
timeout = Integer.valueOf(defaultTimeout);
}
}
return new ExecuteWatchdog(timeout.intValue());
}