All -

I'd like to suggest 2 changes:

1) Remove uses of MimeTypeException from TestParsers class.
2) Move test files from src/main/test to src/test/java.

My explanation:

I noticed that there are two directories containing test classes:

src/test/java:
  org/apache/tika/TestParsers.java

src/main/test:
  org/apache/tika/metadata/TestMetadata.java
  org/apache/tika/metadata/TestSpellCheckedMetadata.java

Would it be a good idea to consolidate all test files into a single tree? 
The Maven POM file seems to require it, as I was unable to specify multiple
directories in the <testSourceDirectory> element.  But even if there is a
way to specify multiple directories, do we need them?

My understanding is that src/test/java is the location that is consistent
with Maven 2 conventions.

Assuming this is ok, there is another problem.  I believe the file currently
in src/test/java (TestParsers.java) will not compile because it refers to
net.hedges.mimeinfo.MimeInfoException, which is not (to my knowledge)
available to me at compile time.  It is not in any compile path in the Maven
project; I only found it out when I changed the POM file so that
<testSourceDirectory> pointed to src/test/java.

What I did was to remove all uses of MimeTypeException, and its import, from
TestParsers.java.  That worked fine, because there were no methods being
called that threw that exception.

- - - -

Let me know if you would like me to enter JIRA issues for this and / or
submit the code changes.

Thanks,
Keith

-- 
View this message in context: 
http://www.nabble.com/Tika-Test-Class-Issues-tf4417897.html#a12601030
Sent from the Apache Tika - Development mailing list archive at Nabble.com.

Reply via email to