oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Kelly <sean.c.ke...@mac.com>
Subject Re: svn commit: r965004 - in /incubator/oodt/trunk/metadata: ./ src/main/resources/ src/main/resources/examples/ src/test/org/apache/oodt/cas/metadata/extractors/ src/testdata/
Date Sat, 17 Jul 2010 14:52:39 GMT
> - 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: 
% echo 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, mattmann@apache.org 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:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message