1 Reply Latest reply on Mar 21, 2011 5:55 AM by Aslak Knutsen

    JUnit @BeforeClass @Before and Alpha5

    dashy Newbie


      after upgrading to Alpha5.

      The @Before and @BeforeClass Annotations of my JUnit TestCasses

      are not executed anymore.


      Is this desired ?



      Leopold Odenthal

        • 1. JUnit @BeforeClass @Before and Alpha5
          Aslak Knutsen Master

          Before/After are now only executed in-conainer, not on the client side. Based on a glitch in the implementation, they are not executed at all when using embedded containers like weld-se|ee or openejb. https://issues.jboss.org/browse/ARQ-56


          With support for multiple containers and mixed runmodes, we need to have better support for how to mark/execute the Before/After methods:





          @Before @OprateOnContainer("x")

          public void setupInContainerX() {}


          @Before @OprateOnContainer("x") @RunAsClient

          public void setupInContainerXIfTestIsExecutedAsClient() {}


          But this needs some filtering integration with the testframework that we're not 100% sure how to yet..