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

Andreas Schaefer commented on SLING-6543:
-----------------------------------------

For now I use this a little bit obscure Maven Plugin to make sure Sling is 
ready to deploy a package through Composum:

            <!-- Wait until Composum is up and running so that we can deploy 
packages -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>wait-maven-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <host>${http.host}</host>
                    <port>${http.port}</port>
                    <file>/bin/browser.html</file>
                    <timeout>10000</timeout>
                    <maxcount>10</maxcount>
                </configuration>
                <executions>
                    <execution>
                        <id>pre-integration-test</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>wait</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

That said this is no ideal as I am not sure how stable that plugin is and it 
might not work in all scenarios.

> slingstart-maven-plugin: Optionally make the start mojo blocking until the 
> server is fully up and running
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6543
>                 URL: https://issues.apache.org/jira/browse/SLING-6543
>             Project: Sling
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: Slingstart Maven Plugin 1.7.0
>            Reporter: Konrad Windszus
>
> Right now the {{start}} goal will only start the server (in a dedicated 
> process) and then return when the control port returns that the server is 
> started. 
> That does not necessarily mean that all services from all bundles are already 
> fully started.
> It should be possible to block until the server is fully started and some 
> services are up and running. Otherwise follow-up processes (like 
> {{maven-failsafe-plugin}}) will need to implement some wait approach.
> One possibility is to issue repeated GET requests against the instance at a 
> dedicated URL until it reports a 200 (similar to what is done in 
> {{SlingTestBase.waitForServerReady(...)}} 
> (https://github.com/apache/sling/blob/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/sling/SlingTestBase.java#L263).
>  The list of URLs must be configurable.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to