My favorites | Sign in
Project Home Downloads Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 66: ANT task overriding defaultrunner does not work
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  virtix
Closed:  Feb 2008
Cc:  marc.es...@gmail.com


 
Project Member Reported by marc.es...@gmail.com, Feb 25, 2008
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
Project Member #1 virtix
Doh! HttpHelp class did not use the parameter passed in. Please  see if it works for 
you.

Maybe a test for this would be a good idea. How much is a box of Cohibas anyway?
Status: In
Cc: marc.esher
Feb 25, 2008
Project Member #2 marc.es...@gmail.com
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
Project Member #3 virtix
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

Powered by Google Project Hosting