Hi,

latest commits on master brought a TikaSearchProvider, contributed by Ulf
Dittmer (JSPWIKI-469). I've added some tests to it, but somehow I'm not
getting them passing at builds.apache.org. Given that I've been able to
deploy a snapshot from my local pc, with those tests successfully running,
I'm a bit blind on what is happening at builds.a.o. At first I thought
there were some concurrency issues which prevented the test from running at
builds.a.o, but right now the offending test really unit tests, and doesn't
rely on background threads finishing indexing attachment on time.

More specifically, current build failure yields:

[ERROR] testGetAttachmentContent  Time elapsed: 5.163 s  <<< ERROR!
java.lang.NullPointerException
        at 
org.apache.wiki.search.tika.TikaSearchProviderTest.testGetAttachmentContent(TikaSearchProviderTest.java:58)

with line 58 on TikaSearchProviderTest being:
String pdfIndexed = tsp.getAttachmentContent( attPdf );

So tsp is the only thing there capable of throwing a NPE. However, tsp is
obtained as:
TikaSearchProvider tsp = ( TikaSearchProvider
)engine.getSearchManager().getSearchEngine();

and the execution log shows that tsp can't be null:

2019-05-04 20:59:01,355 [main] DEBUG
org.apache.wiki.search.SearchManager  - Loaded search provider
org.apache.wiki.search.tika.TikaSearchProvider@7a63c618

so, what I'm missing? can anyone reproduce that NPE?? I could change the
test so tsp gets instantiated and set up manually but that seems
cumbersome, and shouldn't be needed


thx in advance,
juan pablo

Reply via email to