[arquillian-issues] [JBoss JIRA] (ARQ-1771) Putting custom annotation on Drone creates multiple instances

Stefan Miklosovic (JIRA) issues at jboss.org
Mon May 12 04:55:57 EDT 2014


     [ https://issues.jboss.org/browse/ARQ-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Miklosovic resolved ARQ-1771.
------------------------------------

    Fix Version/s: drone_2.0.0.Alpha2
       Resolution: Rejected


> Putting custom annotation on Drone creates multiple instances
> -------------------------------------------------------------
>
>                 Key: ARQ-1771
>                 URL: https://issues.jboss.org/browse/ARQ-1771
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Extension - Drone
>    Affects Versions: drone_2.0.0.Alpha1
>            Reporter: Stefan Miklosovic
>             Fix For: drone_2.0.0.Alpha2
>
>
> I have a test case like this
> {code}
> @RunWith(Arquillian.class)
> @RunAsClient
> public class SomeTestCase
> {
>     @Drone
>     @Mobile
>     @Custom
>     private WebDriver mobile;
>     // tests
> }
> {code}
> where @Custom is just an annotation:
> {code}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ ElementType.FIELD, ElementType.PARAMETER })
> public @interface Custom {
> }
> {code}
> it is _not_ annotated with @Qualifier.
> Realize that the same problem arise when using @OperateOnDeployment from Arquillian which is not annotated with @Qualifier neither.
> I am getting this:
> http://pastebin.com/raw.php?i=i9DVqeaC
> You see that InstrumentationPerformDecider.decidePerformingInstrumentation observes BeforeDroneInstantiated so when it is treated twice, you are going to instantiate two Drones which is another argument why Drone does it wrong.
> When I declare Drone injection like that, it results into two instances of WebDrivers so that means it instruments Android package twice with two Selendroids so that mean I am getting NoUniqueWebDriverException when I want to start some activity because from now on you have "by accident" two webdrivers instrumenting the same deployment as a result of a bug where putting custom annotation on Drone instantiates it twice.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the arquillian-issues mailing list