> - OODT-15 WIP: fix problems with extractors in metadata; fix and enable all 
> unit tests that were disabled per kelly; cleanup license headers on conf 
> files; deploy conf files using Maven testResource bootstrap. Clean up deps. 
> metadata fully functioning


Those tests are still, sadly, broken. They all assume that $CWD (current 
working directory) is "..../metadata" and then create File objects relative to 
$CWD:

-----------------------------------------------------
% svn co https://svn.apache.org/repos/asf/incubator/oodt/trunk oodt
% cd oodt
% mvn test
[INFO] Scanning for projects...
[INFO] Reactor build order: 
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.oodt.cas.metadata.extractors.TestMetReader
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.204 sec
Running 
org.apache.oodt.cas.metadata.extractors.TestExternMetExtractorConfigReader
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec <<< 
FAILURE!
...
Failed tests: 
  
testReadConfig(org.apache.oodt.cas.metadata.extractors.TestExternMetExtractorConfigReader)
  testEval(org.apache.oodt.cas.metadata.preconditions.TestPreCondEvalUtils)
  testExtractor(org.apache.oodt.cas.metadata.extractors.TestExternMetExtractor)
  
testExtractMetadata(org.apache.oodt.cas.metadata.extractors.TestCopyAndRewriteExtractor)
  
testReplaceOrigMetFilePath(org.apache.oodt.cas.metadata.extractors.TestCopyAndRewriteExtractor)
...
% echo bummer
bummer
-----------------------------------------------------

The proper way to fetch resources, including test resources, is with 
Class.getResource* methods. If the API being tested absolutely has to File 
objects as input (instead of URLs, InputStreams, or Readers), then create 
temporary files by reading the file data from with Class.getResourceAsStream, 
and pass those temporary files to the APIs being tested.



On 2010.Jul.16, at 10.13p, [email protected] wrote:

> Author: mattmann
> Date: Sat Jul 17 03:13:59 2010
> New Revision: 965004
> 
> URL: http://svn.apache.org/viewvc?rev=965004&view=rev
> Log:

Reply via email to