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/07/31 06:54:38 UTC
[jira] [Resolved] (OODT-722) Fix File Manager Unit Tests -
'repository' Package
[ https://issues.apache.org/jira/browse/OODT-722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ross Laidlaw resolved OODT-722.
-------------------------------
Resolution: Fixed
I've committed the change to the trunk in r1614810.
> Fix File Manager Unit Tests - 'repository' Package
> --------------------------------------------------
>
> Key: OODT-722
> URL: https://issues.apache.org/jira/browse/OODT-722
> 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-722.fix-repository-tests.rlaidlaw.2014-07-29.patch.txt
>
>
> This step fixes unit tests for the file manager's 'repository' package. This package has only a single test class TestXMLRepositoryManager and the changes are trivial (a couple of lines in the constructor):
> Before:
> {noformat}
> public TestXMLRepositoryManager() {
> productTypeDirUris.add(new File("./src/testdata/repomgr").toURI().toString());
> ...
> }
> {noformat}
> After:
> {noformat}
> import java.net.URL;
> ...
> public TestXMLRepositoryManager() {
> URL url = this.getClass().getResource("/repomgr");
> productTypeDirUris.add(new File(url.getFile()).toURI().toString());
> ...
> }
> {noformat}
> There aren't any System.setProperty() calls in this test class so it's fairly straightforward to fix.
> Test results before applying the patch:
> {noformat}
> Results :
> Failed tests:
> testGetProductTypes(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): expected:<3> but was:<0>
> testGetProductTypeByName(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testGetProductTypeById(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadProductTypeWithMetadataWithBlankMet(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadProductTypeWithMetadataWithNoMet(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadProductTypeWithMetadata(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadBadFormattedDescriptionTrimImplicitTrue(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadDescriptionTrimExplicitFalse(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadDescriptionTrimExplicitTrue(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadVersionerClass(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> testReadRepoPath(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): null
> Tests in error:
> testRepoPathEnvVarReplace(org.apache.oodt.cas.filemgr.repository.TestXMLRepositoryManager): 0
> Tests run: 12, Failures: 11, Errors: 1, Skipped: 0
> {noformat}
> Test results after applying the patch:
> {noformat}
> Results :
> Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
> {noformat}
> The following command runs the test from the top level directory:
> {noformat}
> mvn clean -Dtest=TestXMLRepositoryManager -DfailIfNoTests=false test -pl filemgr -am
> {noformat}
> The following command runs the test within the filemgr subdirectory:
> {noformat}
> mvn clean -Dtest=TestXMLRepositoryManager test
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)