You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Ross Laidlaw (JIRA)" <ji...@apache.org> on 2014/08/06 06:06:11 UTC
[jira] [Updated] (OODT-737) Fix File Manager Unit Tests - 'cli'
Package
[ https://issues.apache.org/jira/browse/OODT-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ross Laidlaw updated OODT-737:
------------------------------
Attachment: OODT-737.fix-cli-tests.rlaidlaw.2014-08-05.patch.txt
This patch fixes all but one of the tests in the 'cli' package. The tests originally referenced resources in 'src/main' and the version of cmd-line-options.xml in src/main had the following additional XML code (i.e. src/test/resources/cmd-line-options.xml didn't have this code):
{code:xml}
<bean id="typeName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
<property name="shortOption" value="tn" />
<property name="longOption" value="typeName" />
<property name="description" value="ProductType name" />
<property name="hasArgs" value="true" />
<property name="argsDescription" value="product-type-name" />
<property name="requirementRules">
<list>
<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
p:actionName="addProductType" p:relation="REQUIRED" />
</list>
</property>
<property name="handler">
<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
<property name="applyToActions">
<list>
<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
p:actionName="addProductType"
p:methodName="setProductTypeName"/>
</list>
</property>
</bean>
</property>
</bean>
{code}
Without the above code all tests pass, but with this additional code I get the following error for TestFileManagerCli#testAddProductType when running the tests:
{noformat}
Results :
Tests in error:
testAddProductType(org.apache.oodt.cas.filemgr.cli.TestFileManagerCli): org.apache.oodt.cas.cli.exception.CmdLineConstructionException: Invalid option: 'typeName'
Tests run: 21, Failures: 0, Errors: 1, Skipped: 0
{noformat}
I've committed the patch in r1616087 as an incremental step since it fixes 20 tests. Hopefully we can work out why the additional XML is causing the one test to fail.
> Fix File Manager Unit Tests - 'cli' Package
> -------------------------------------------
>
> Key: OODT-737
> URL: https://issues.apache.org/jira/browse/OODT-737
> Project: OODT
> Issue Type: Sub-task
> Components: file manager
> Affects Versions: 0.7
> Reporter: Ross Laidlaw
> Assignee: Ross Laidlaw
> Labels: patch, test
> Fix For: 0.7
>
> Attachments: OODT-737.fix-cli-tests.rlaidlaw.2014-08-05.patch.txt
>
>
> There are 21 failing tests from the 'cli' package that need to be repaired.
--
This message was sent by Atlassian JIRA
(v6.2#6252)