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:25:38 UTC
[jira] [Created] (OODT-723) Fix File Manager Unit Tests -
'validation' Package
Ross Laidlaw created OODT-723:
---------------------------------
Summary: 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
Fix For: 0.7
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)