You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Marius Petria (JIRA)" <ji...@apache.org> on 2014/03/26 10:23:18 UTC

[jira] [Updated] (SLING-3478) Facilitate writing of integration tests for multiple instances

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

Marius Petria updated SLING-3478:
---------------------------------

    Attachment: SLING-3478.patch

I have refactored the original SlingTestBase to reuse most of the code and settings for MultipleSlingTestBase. Also, I have added the MultipleOsgiConsoleTest to show how this can be used.

A test that needs multiple instance should extend MultipleSlingTestBase and declare the names of the instances that it needs to use. The instance names are used to retrieve configuration properties from system properties (they are used as a prefixes).

{code}
<instance1.jar.executor.server.port>${instance1.http.port}</instance1.jar.executor.server.port>
<instance2.jar.executor.server.port>${instance2.http.port}</instance2.jar.executor.server.port>
{code}

{code}
public class MultipleOsgiConsoleTest extends MultipleSlingTestBase {

    public MultipleOsgiConsoleTest() {
        super("instance1", "instance2");
    }

    @Test
    public void testSomeConsolePaths() throws Exception {
        for (SlingInstance slingInstance : getInstances()) {
            testSomeConsolePaths(slingInstance);
        }
    }
{code}

> Facilitate writing of integration tests for multiple instances
> --------------------------------------------------------------
>
>                 Key: SLING-3478
>                 URL: https://issues.apache.org/jira/browse/SLING-3478
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Marius Petria
>         Attachments: SLING-3478.patch
>
>
> Facilitate writing of integration tests for multiple instances. This is needed for better testing features like replication or topology discovery.
> Create a base class for such tests and a way to configure multiple instances and also sample integration test.



--
This message was sent by Atlassian JIRA
(v6.2#6252)