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

@OperateOnDeployment ignores value and operates on random deployment in in-container test

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.0.3.Final
    • None

      The following (in-container) test sometimes passes and other times fails with java.lang.NoClassDefFoundError for B.
      It seems that the order of declaration of @Deployment methods has influence on the frequency of failures.

      A and B are empty dummy classes.

      OperateOnDeploymentTest.java
      @RunWith(Arquillian.class)
      public class OperateOnDeploymentTest {
      
          @Deployment(name = "A")
          public static Archive<?> deployA() {
              return ShrinkWrap.create(WebArchive.class).addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").
                      .addClass(A.class);
          }
      
          @Deployment(name = "B")
          public static Archive<?> deployB() {
              return ShrinkWrap.create(WebArchive.class).addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").
                      .addClass(B.class);
          }
      
          @Test
          @OperateOnDeployment("B")
          public void testB() {
              B.class.getName();
          }
      }
      

              aslak@redhat.com Aslak Knutsen
              rsmeral Ron Šmeral (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: