[JBoss JIRA] (ARQ-1779) Test are not executed using combinations of @ApplyScriptBefore / @ApplyScriptAfter
by Thomas Küstermann (JIRA)
Thomas Küstermann created ARQ-1779:
--------------------------------------
Summary: Test are not executed using combinations of @ApplyScriptBefore / @ApplyScriptAfter
Key: ARQ-1779
URL: https://issues.jboss.org/browse/ARQ-1779
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha7
Reporter: Thomas Küstermann
Assignee: Bartosz Majsak
Forum reference: https://community.jboss.org/message/874117
The following test case succeeds (green bar) although it should fail:
{code:java}
@RunWith(Arquillian.class)
@DataSource("java:oracleDS")
@Cleanup(phase=TestExecutionPhase.NONE)
@ApplyScriptBefore("deploy-db-functionality.sql")
@ApplyScriptAfter("undeploy-db-functionality.sql")
public class PersistenceIT {
// @Deployment ...
@Test
@ApplyScriptBefore("trigger-db-functionality.sql")
public void shouldFail() {
Assert.fail("should fail, but doesn't");
}
}
{code}
Removing class level annotations does not work either:
{code:java}
@Test
@ApplyScriptBefore({ "deploy-db-functionality.sql", "trigger-db-functionality.sql" })
@ApplyScriptAfter("undeploy-db-functionality.sql")
public void shouldFail() { ... }
{code}
What actually works is to use only one ApplyScriptBefore / ApplyScriptAfter annotation per test, each with only one script to execute.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month
[JBoss JIRA] (ARQ-1778) Add global container setting for bundle autostart after deployment.
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1778?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik edited comment on ARQ-1778 at 5/17/14 11:14 AM:
----------------------------------------------------------------
I would like to create a unit test for this feature but I do not want to modify {{arquillian.xml}} file. I have created *ResourceProvider* for container configuration class but injection into my test works only in _client_ tests ({{@RunAsClient}}). When I modify the configuration in client test and then execute another _in-container_ test, some classes are missing in deployed bundle (e.g. {{KarafManagedContainerConfiguration}} and others). Why? I do not use this class in this test, only in that client test. How can I inject configuration via {{@ArquillianResource}} (it is already implemented) into in-container test? Or how to make a client test independent of in-container test?
was (Author: mbasovni):
I would like to create a unit test for this feature but I do not want to modify {{arquillian.xml}} file. I have created *ResourceProvider* for container configuration class but injection into my test works only in client tests ({{@RunAsClient}}). When I modify the configuration and then execute another "in-container" test, some classes are missing in deployed bundle (e.g. {{KarafManagedContainerConfiguration}} and others). Why? I do not use this class in this method, just in client method.
> Add global container setting for bundle autostart after deployment.
> -------------------------------------------------------------------
>
> Key: ARQ-1778
> URL: https://issues.jboss.org/browse/ARQ-1778
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Reporter: Martin Basovnik
> Assignee: Thomas Diesler
>
> Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
> Add new global container property *autostartBundle*. This will cause autostart of every deployed bundle via container's public method {{deploy(Archive<?> archive)}}. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
> Property type will be {{boolean}} and default value {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month
[JBoss JIRA] (ARQ-1778) Add global container setting for bundle autostart after deployment.
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1778?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik commented on ARQ-1778:
--------------------------------------
I would like to create a unit test for this feature but I do not want to modify {{arquillian.xml}} file. I have created *ResourceProvider* for container configuration class but injection into my test works only in client tests ({{@RunAsClient}}). When I modify the configuration and then execute another "in-container" test, some classes are missing in deployed bundle (e.g. {{KarafManagedContainerConfiguration}} and others). Why? I do not use this class in this method, just in client method.
> Add global container setting for bundle autostart after deployment.
> -------------------------------------------------------------------
>
> Key: ARQ-1778
> URL: https://issues.jboss.org/browse/ARQ-1778
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Reporter: Martin Basovnik
> Assignee: Thomas Diesler
>
> Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
> Add new global container property *autostartBundle*. This will cause autostart of every deployed bundle via container's public method {{deploy(Archive<?> archive)}}. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
> Property type will be {{boolean}} and default value {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month
[JBoss JIRA] (ARQ-1778) Add global container setting for bundle autostart after deployment.
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1778?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik updated ARQ-1778:
---------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/arquillian/arquillian-container-osgi/pull/16
> Add global container setting for bundle autostart after deployment.
> -------------------------------------------------------------------
>
> Key: ARQ-1778
> URL: https://issues.jboss.org/browse/ARQ-1778
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Reporter: Martin Basovnik
> Assignee: Thomas Diesler
>
> Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
> Add new global container property *autostartBundle*. This will cause autostart of every deployed bundle via container's public method {{deploy(Archive<?> archive)}}. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
> Property type will be {{boolean}} and default value {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month
[JBoss JIRA] (ARQ-1778) Add global container setting for bundle autostart after deployment.
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1778?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik updated ARQ-1778:
---------------------------------
Description:
Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
Add new global container property *autostartBundle*. This will cause autostart of every deployed bundle via container's public method {{deploy(Archive<?> archive)}}. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
Property type will be {{boolean}} and default value {{false}}.
was:
Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
Add new global container property *autostartBundle*. This will cause autostart of all deployed bundles. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
Property type will be {{boolean}} and default value {{false}}.
> Add global container setting for bundle autostart after deployment.
> -------------------------------------------------------------------
>
> Key: ARQ-1778
> URL: https://issues.jboss.org/browse/ARQ-1778
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Reporter: Martin Basovnik
> Assignee: Thomas Diesler
>
> Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
> Add new global container property *autostartBundle*. This will cause autostart of every deployed bundle via container's public method {{deploy(Archive<?> archive)}}. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
> Property type will be {{boolean}} and default value {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month
[JBoss JIRA] (ARQ-1778) Add global container setting for bundle autostart after deployment.
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1778?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik updated ARQ-1778:
---------------------------------
Description:
Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
Add new global container property *autostartBundle*. This will cause autostart of all deployed bundles. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
Property type will be {{boolean}} and default value {{false}}.
was:
Bundle is not started automaticly after installation now.
Create new container property *autostartBundle*. It's type will be {{boolean}} and default value {{false}}.
BundleContext cannot be injected in application servers (e.g. EAP) and arquillian tests cannot be shared now with both containers.
Annotation {{(a)org.jboss.arquillian.osgi.StartLevelAware(autostart = true)}} does not solve this problem, because maven artifact with this annotation can add another container on classpath and this is problem.
> Add global container setting for bundle autostart after deployment.
> -------------------------------------------------------------------
>
> Key: ARQ-1778
> URL: https://issues.jboss.org/browse/ARQ-1778
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Reporter: Martin Basovnik
> Assignee: Thomas Diesler
>
> Bundle is not started automaticly after deployment. It is possible to use annotation {{@StartLevelAware(autostart = true)}} for specific test now.
> Add new global container property *autostartBundle*. This will cause autostart of all deployed bundles. If either annotation of specific bundle or container property will have positive value bundle will be started. One setting with positive value will always override the second one with negative value.
> Property type will be {{boolean}} and default value {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month
[JBoss JIRA] (ARQ-1778) Add global container setting for bundle autostart after deployment.
by Martin Basovnik (JIRA)
[ https://issues.jboss.org/browse/ARQ-1778?page=com.atlassian.jira.plugin.s... ]
Martin Basovnik updated ARQ-1778:
---------------------------------
Summary: Add global container setting for bundle autostart after deployment. (was: Add support for automatic starting of bundle after installation)
> Add global container setting for bundle autostart after deployment.
> -------------------------------------------------------------------
>
> Key: ARQ-1778
> URL: https://issues.jboss.org/browse/ARQ-1778
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: OSGi Containers
> Reporter: Martin Basovnik
> Assignee: Thomas Diesler
>
> Bundle is not started automaticly after installation now.
> Create new container property *autostartBundle*. It's type will be {{boolean}} and default value {{false}}.
> BundleContext cannot be injected in application servers (e.g. EAP) and arquillian tests cannot be shared now with both containers.
> Annotation {{(a)org.jboss.arquillian.osgi.StartLevelAware(autostart = true)}} does not solve this problem, because maven artifact with this annotation can add another container on classpath and this is problem.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 1 month