[arquillian-issues] [JBoss JIRA] (ARQ-1586) ClassContextImpl is not active during TestNG @BeforeMethod

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Thu Nov 28 07:36:05 EST 2013


    [ https://issues.jboss.org/browse/ARQ-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927342#comment-12927342 ] 

Lukáš Fryč commented on ARQ-1586:
---------------------------------

Juraj, have you checked whether the context should be active at that point according to the Arquillian execution lifecycle?

You can look at execution tree and paste it here:
http://lukas.fryc.eu/blog/2013/06/debugging-arquillian.html
                
> ClassContextImpl is not active during TestNG @BeforeMethod
> ----------------------------------------------------------
>
>                 Key: ARQ-1586
>                 URL: https://issues.jboss.org/browse/ARQ-1586
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Base Implementation
>    Affects Versions: 1.1.1.Final
>            Reporter: Juraj Húska
>
> When I call [this|https://github.com/arquillian/arquillian-graphene/blob/master/api/src/main/java/org/jboss/arquillian/graphene/Graphene.java#L263] Arquillian Graphene's method in method annotated with TestNG {{@BeforeMethod}}, then it is not possible to get Graphene's configuration.
> On this [line|https://github.com/arquillian/arquillian-graphene/blob/master/impl/src/main/java/org/jboss/arquillian/graphene/enricher/WebElementEnricher.java#L68], {{configuration.get()}} returns {{null}}.
> The configuration should be retrieved from {{Instance<GrapheneConfiguration>}}. However, it is not.
> When I compare this to JUnit {{@Before}}, I came to this:
> At {{ManagerImpl.java}} [here|https://github.com/arquillian/arquillian-core/blob/master/core/impl-base/src/main/java/org/jboss/arquillian/core/impl/ManagerImpl.java#L186], the configuration is retrieved from context {{ClassContextImpl}}.
> However, that context is not marked as active when executing from TestNG (among the others contexts).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the arquillian-issues mailing list