Ack, I was testing them from within the metadata project, where they still
work:

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec
Running org.apache.oodt.cas.metadata.extractors.TestCopyAndRewriteExtractor
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.39 sec

Results :

Tests run: 17, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 29 seconds
[INFO] Finished at: Sat Jul 17 08:39:51 PDT 2010
[INFO] Final Memory: 28M/81M
[INFO] 
------------------------------------------------------------------------
[chipotle:oodt/trunk/metadata] mattmann% pwd
/Users/mattmann/src/oodt/trunk/metadata
[chipotle:oodt/trunk/metadata] mattmann%

The problem is, even though I changed all of the conf files to load using
getClass().getResource(name).getFile(), the file paths referenced inside of
the config files is relative still in some cases. Ack. So it's not going to
be easy...which is why I'm glad you volunteered! LOL

Cheers,
Chris




On 7/17/10 7:57 AM, "Sean Kelly" <[email protected]> wrote:

> One other note:
> 
> 1. Time permitting I'll adjust the code to do just that today
> 
> and:
> 2. I need to remember to fix the "From:" header to read from my apache.org
> account!
> 
> OK, that's two other notes in total:
> 
> 1. Time permitting I'll adjust the code to do just that today
> 2. I need to remember to fix the "From:" header to read from my apache.org
> account!
> 
> and:
> 3. No one expects the Spanish Inquisition
> 
> 
> On 2010.Jul.17, at 9.52a, Sean Kelly wrote:
> 
>>> - 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.TestExternMetExtractor
>> ConfigReader)
>>  testEval(org.apache.oodt.cas.metadata.preconditions.TestPreCondEvalUtils)
>>  
>> testExtractor(org.apache.oodt.cas.metadata.extractors.TestExternMetExtractor)
>>  
>> testExtractMetadata(org.apache.oodt.cas.metadata.extractors.TestCopyAndRewrit
>> eExtractor)
>>  
>> testReplaceOrigMetFilePath(org.apache.oodt.cas.metadata.extractors.TestCopyAn
>> dRewriteExtractor)
>> ...
>> % 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:
>> 
> 
> 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: [email protected]
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Reply via email to