| Issue 66: | ANT task overriding defaultrunner does not work | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. create a cfc that extends HttpAntRunner
then try to use it in ant, like so:
<mxunittask server="${server}" port="${port}"
defaultRunner="/DOCS/TestManager2/HttpAntRunner.cfc"
outputdir="${output.dir}" verbose="true" testResultsSummary="my.unitsummary">
<directory remoteMethod="run" path="${tests.unit}"
packageName="${tests.componentpath}.Unit"
componentPath="${tests.componentpath}.Unit" recurse="true" includes="*.cfc"
excludes="" />
</mxunittask>
it spits out the correct defaultRunner value with verbose on, but it
doesnt' actually execute that URL. instead, it still executes the mxunit
one. looking at the code, the problem appears to be that the "runner"
variable in the directory inner class is not empty by default, and the code
tests for that condition to determine whether to use the default runner or
the directory-specific runner. so in effect the default runner is never
used because the directory specific runner is always used. but the problem
is hidden since the default runner and the directory specific runner values
are the same by default.
Feb 25, 2008
it looks to me like it is using the parameter for defaultRunner, but there's flawed logic in the directory class, because it tests for a getRunner() returning not empty. But it will never return empty because the runner var is set hard coded to have a value
Feb 27, 2008
This is fixed. On Marc's last comment, it is possible to have an empty d.getRunner() if the user does something like runner="". This is defensive and I can easily see Bertrand Myer raising his bushy eyebrows ;-)
Status:
Fixed
|
Cc: marc.esher