Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1557

Align undeployment logic in a proper Arquillian way

    XMLWordPrintable

Details

    Description

      Right now, undeployment logic for Droidium is bound to observer which observes with precedence -100 on AfterClass event in order to be sure that this observer will be treated as the latest one.

      Right now, we have to be sure that undeployment logic is treated lastly in AfterClass since Arquillian Drone destroys WebDriver instances in AfterClass as well and the destruction of WebDriver instance, in our case, means that Selendroid server will be uninstalled from Android device.

      Since the destruction of WebDriver instance itself is executed randomly in AfterClass regarding of execution time, we can not do undeployment of APKs on UnDeployDeployment event because when doing so, uninstallation of instrumented APK automatically kills Selendroid server process as well so that in turn means that subsequent trying to destroy WebDriver instance fails since Selendroid server is not running anymore and Drone talks to nobody.

      To be sure that all Selendroid servers are uninstalled so we can proceed with the uninstallation of deployments, where it should be done, there has to be a guarantee that all WebDriver instances were already destroyed.

      The solution here seems to be quite simple - we put some positive precedence for DroneDestructor (1) however by doing so, it could cause some backward compatibility issues with Drone extension.

      (1) https://github.com/arquillian/arquillian-extension-drone/blob/master/drone-impl/src/main/java/org/jboss/arquillian/drone/impl/DroneDestructor.java#L69

      Attachments

        Activity

          People

            smikloso Stefan Miklosovic (Inactive)
            smikloso Stefan Miklosovic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: