[ 
https://issues.apache.org/jira/browse/SLING-6031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz reassigned SLING-6031:
------------------------------------------

    Assignee: Bertrand Delacretaz

In the vast majority of cases when the test code calls {{getService}} I suppose 
it expects the service to be available, so the timeout should probably be set 
just once by the active {{TeleporterRule.Customizer}} to avoid repeating the 
timeout in each test.

If a test really needs to find out about an optional service it can use the 
{{BundleContext}} directly as {{getService}} can provide it.

The problem is that currently the {{Customizer}} talks to the client side only, 
it will need to be modified to pass options to the server side - maybe just by 
adding them as headers to the test bundle that's built for running the test.

I'm assigning this ticket to myself to avoid forgetting it but if someone wants 
to implement this feel free to reassign to yourself!

> Teleporter: Wait for Services not ready yet on startup
> ------------------------------------------------------
>
>                 Key: SLING-6031
>                 URL: https://issues.apache.org/jira/browse/SLING-6031
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Stefan Seifert
>            Assignee: Bertrand Delacretaz
>             Fix For: JUnit Tests Teleporter 1.0.8
>
>
> the JUnit TeleporterRule provides a getService method to get OSGi services 
> for the test run. this may return null for services that are not yet started.
> as a workaround some integration tests implement their own "WaitFor" pattern
> https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/repoinit/it/src/test/java/org/apache/sling/repoinit/it/WaitFor.java
> it should be supported by the teleporter rule directly.



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

Reply via email to