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

Drone use concurrent.ExecutorService without Context inheritance on Threads

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • drone_1.2.4.Final
    • drone_1.2.3.Final, 1.1.3.Final
    • Extension - Drone
    • None

      Context's in Arquillian are bound to ThreadLocals within their lifecycle. In Core 1.0.4.Final this was changed to use InheritableThreadLocal to fix an issue with the TestFramework not finding Core when executing multiple threads. This had some unforeseen consequences and in the end reverted in 1.1.3.Final.

      Somewhere inbetween those versions, Drone started to use a Threaded WebDriver creation to allow timeout control. This is now failing, since the InstanceCallable is called on a 'empty' Thread.

      https://github.com/arquillian/arquillian-extension-drone/blob/master/drone-impl/src/main/java/org/jboss/arquillian/drone/impl/DroneInstanceCreator.java#L84

            [ARQ-1653] Drone use concurrent.ExecutorService without Context inheritance on Threads

            Karel Piwko added a comment -

            Karel Piwko added a comment - Pushed upstream for Drone in https://github.com/arquillian/arquillian-extension-drone/commit/38c31b9c26246d1fb37e043e4fbc3c41d724549a

            I have a patch in the works that fix it in Drone using a similar technique as used by the ServletProtocol;
            https://github.com/arquillian/arquillian-core/blob/master/container/test-impl-base/src/main/java/org/jboss/arquillian/container/test/impl/execution/RemoteTestExecuter.java#L136

            Tho, I think a long term fix is to expose a ExecutorService service in Core that can handle this internally, to avoid leaking to much impl details into the extensions.

            Aslak Knutsen added a comment - I have a patch in the works that fix it in Drone using a similar technique as used by the ServletProtocol; https://github.com/arquillian/arquillian-core/blob/master/container/test-impl-base/src/main/java/org/jboss/arquillian/container/test/impl/execution/RemoteTestExecuter.java#L136 Tho, I think a long term fix is to expose a ExecutorService service in Core that can handle this internally, to avoid leaking to much impl details into the extensions.

              aslak@redhat.com Aslak Knutsen
              aslak@redhat.com Aslak Knutsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: