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 07:33:38 UTC
[jira] [Commented] (OODT-723) Fix File Manager Unit Tests -
'validation' Package
[ https://issues.apache.org/jira/browse/OODT-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080519#comment-14080519 ]
Ross Laidlaw commented on OODT-723:
-----------------------------------
I've attached the patch and added it to [review board|https://reviews.apache.org/r/24140/] for reference.
> Fix File Manager Unit Tests - 'validation' Package
> --------------------------------------------------
>
> Key: OODT-723
> URL: https://issues.apache.org/jira/browse/OODT-723
> 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-723.fix-validation-tests.rlaidlaw.2014-07-30.patch.txt
>
>
> This step fixes unit tests for the file manager's 'validation' package. This package has a single test class TestXMLValidationLayer and the changes are trivial (a couple of lines in the setUp() method):
> Before:
> {noformat}
> protected void setUp() throws Exception {
> ...
> for (File f : new File("./src/testdata/vallayer")
> ...
> }
> {noformat}
> After:
> {noformat}
> import java.net.URL;
> ...
> protected void setUp() throws Exception {
> ...
> URL url = this.getClass().getResource("/vallayer");
> for (File f : new File(url.getFile())
> ...
> }
> {noformat}
> This is a straightforward fix as there are no System.setProperty() calls in this test class.
> Test results before applying the patch:
> {noformat}
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer
> Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.038 sec <<< FAILURE!
> Results :
> Tests in error:
> testModifyElement(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> testGetElements(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> testReadProperDescriptionTrimImplicitTrue(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> testReadBadFormattedDescriptionTrimImplicitTrue(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> testReadDescriptionTrimExplicitFalse(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> testReadDescriptionTrimExplicitTrue(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> testGetElementsForProductType(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
> Tests run: 7, Failures: 0, Errors: 7, Skipped: 0
> {noformat}
> Test results after applying the patch:
> {noformat}
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.234 sec
> Results :
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
> {noformat}
> The following command runs the test from the top level directory:
> {noformat}
> mvn clean -Dtest=TestXMLValidationLayer -DfailIfNoTests=false test -pl filemgr -am
> {noformat}
> The following command runs the test within the filemgr subdirectory:
> {noformat}
> mvn clean -Dtest=TestXMLValidationLayer test
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)