Uploaded image for project: 'WildFly Arquillian'
  1. WildFly Arquillian
  2. WFARQ-46

Multi deployment does not work for Arquillian for AS7 protocol

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • None
    • None
    • None
    • Hide

      Use servlet protocol for deployment instead of JMX: @OverProtocol("Servlet 3.0"), see forum for more details.

      Show
      Use servlet protocol for deployment instead of JMX: @OverProtocol("Servlet 3.0"), see forum for more details.

      For Arquillian the multideployment does not work over AS7 protocol. This issue was discussed with Aslak Knutsen and you can check the forum https://community.jboss.org/message/714601 for more details.

      When you want to create two deployments (two jars to deploy) in a one test file and each deployment has its own test (test operates on the deployment) then test does not find correct module in which is executed. One test passes while second one fails with CNFE when it tries to make JNDI lookup for own session bean.

      The test class is like this:

          @Deployment(managed=true, testable = true, name = "postconstruct", order = 1)
          public static Archive<?> deploy() {
             ...
             return jar1;
          }
          
          @Deployment(managed=true, testable = true, name = "postconstruct2", order = 2)
          public static Archive<?> deploy2() {
             ...
             return jar2;
          }
          
          @Test
          @OperateOnDeployment("postconstruct")
          public void test() throws NamingException {
             CountedSessionBean bean = (CountedSessionBean) ctx.lookup("java:global/postconstruct/" + CountedSessionBean.class.getSimpleName());
             ...
          }
          
          @Test
          @OperateOnDeployment("postconstruct2")
          public void test2() {
             CountedSessionBean2 bean = (CountedSessionBean2) ctx.lookup("java:global/postconstruct2/" + CountedSessionBean2.class.getSimpleName());
             ...
          }
      

              jperkins-rhn James Perkins
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: