You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Bob Paulin (JIRA)" <ji...@apache.org> on 2015/05/15 00:43:59 UTC

[jira] [Commented] (TIKA-1617) Change OSGi Detection test to use OSGi Service

    [ https://issues.apache.org/jira/browse/TIKA-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14544515#comment-14544515 ] 

Bob Paulin commented on TIKA-1617:
----------------------------------

{quote}
 Does that mean that the other unit tests in there that use a Tika object are running outside of the bundle? 
{quote}
Generally I would say you would want users to use the service rather than instantiating their own Tika objects.  When you use PAX-EXAM for unit tests in OSGi it does create a bundle with just the unit tests (see http://iocanel.blogspot.com/2012/01/advanced-integration-testing-with-pax.html).  I'm not certain what the use case would be for instantiate a new Tika object when I already have one in a services that allows me to keep the Tika object in it's own classloader isolated from the rest of the code in the test bundle. The less we exposes the less classes we need to export out of the tika-bundle.
{quote}
And if so, how can we get the Tika facade class to play nicely with OSGi?
{quote}
What's not playing nicely right now?  I believe the test also passed with the Tika object there too.  I just think if you have a service it's better to use it since users will generally look to unit test for implementation hints.


> Change OSGi Detection test to use OSGi Service
> ----------------------------------------------
>
>                 Key: TIKA-1617
>                 URL: https://issues.apache.org/jira/browse/TIKA-1617
>             Project: Tika
>          Issue Type: Test
>            Reporter: Bob Paulin
>            Priority: Minor
>         Attachments: TIKA-1617.patch
>
>
> Currently the testDetection test does not actually use the OSGi service created within the OSGi Framework.  I've changed the test to use the service defined in the tika-bundle



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)