You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2018/02/27 08:59:00 UTC

[jira] [Commented] (DELTASPIKE-1319) labeled alternatives

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

Gerhard Petracek commented on DELTASPIKE-1319:
----------------------------------------------

the patch contains 2 uc-tests based on @TestControl.

with meecrowave it would look like e.g.:

{code}
@ClassRule
public static final MeecrowaveRule RULE = new MeecrowaveRule() {
    @Override
    protected AutoCloseable onStart() {
        System.setProperty("activeAlternativeLabel", "myLabel");
        return super.onStart();
    }
};
{code}

> labeled alternatives
> --------------------
>
>                 Key: DELTASPIKE-1319
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1319
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: Core, TestControl
>    Affects Versions: 1.8.1
>            Reporter: Gerhard Petracek
>            Assignee: Gerhard Petracek
>            Priority: Major
>             Fix For: 1.8.2
>
>         Attachments: DELTASPIKE_1319_first_draft__without_spi_.patch
>
>
> target setup: ds-testcontrol as well as containers like meecrowave which support one instance per test-class, but deploy the whole application.
> in several cases it's essential to bind alternative beans only to a subset of all tests.
> currently we just support that partially via the mock-support (which is very limited in several cases).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)