2 Replies Latest reply on Nov 23, 2007 8:29 AM by alesj

    NotUnpackedRARDeploymentUnitTestCase test

    alesj

      Previously NotUnpackedRARDeploymentUnitTestCase test was marked as it should completely fail:

       public void testNotRARDeployment() throws Exception
       {
       assertNotDeployed(notRar1DeploymentUnpacked);
       }
      


      Now, not even that it doesn't fail, we even get some child deployment units attached to it:
      As being recognised by JARStructure:
      17:19:26,484 TRACE [JARStructure] Recognised: unpacked-mcf1-not.arar
      17:19:26,484 TRACE [VFSStructuralDeployersImpl] unpacked-mcf1-not.arar recognised by org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@e31e33
      

      then also contains
      17:19:26,484 TRACE [JARStructure] Added context ContextInfoImpl{path= metaData=META-INF classPath=null} from testdeployers-mcf1.jar
      17:19:26,484 TRACE [JARStructure] Added classpath entry testdeployers-mcf1.jar for testdeployers-mcf1.jar from FileHandler@30701975[path= context=file:/C:/projects/jboss5/trunk/testsuite/output/lib/unpacked-mcf1-not.arar/ real=file:/C:/projects/jboss5/trunk/testsuite/output/lib/unpacked-mcf1-not.arar/]
      


      Is this expected?
      I guess we don't want to have child components deployed, but not the top level deployment?

      I changed the calls of
      assertNotDeployed(String deployment)
      

      to
      assertNoChildContexts(String deployment)
      
      .
      Since FileStructure 'recognises' all top level files, and as such DeploymentContext is created for underlying deployment. As such, I checked if there were no children.
      Which looks like a wrong way od checking, if we allow the upper use case to be valid.

        • 1. Re: NotUnpackedRARDeploymentUnitTestCase test

           

          "alesj" wrote:

          Since FileStructure 'recognises' all top level files, and as such DeploymentContext is created for underlying deployment. As such, I checked if there were no children.
          Which looks like a wrong way od checking, if we allow the upper use case to be valid.


          This test is out-of-date.
          But, it's the JARStructure not the FileStructure that recognises it.

          That's because in JBoss5 we don't require you have the correct extension
          for top level deployments. We look at the structure instead.
          In this case, there is a META-INF sub-folder so it is a jar.

          • 2. Re: NotUnpackedRARDeploymentUnitTestCase test
            alesj

             

            "adrian@jboss.org" wrote:

            But, it's the JARStructure not the FileStructure that recognises it.

            "alesj" wrote:

            As being recognised by JARStructure:
            17:19:26,484 TRACE [JARStructure] Recognised: unpacked-mcf1-not.arar
            17:19:26,484 TRACE [VFSStructuralDeployersImpl] unpacked-mcf1-not.arar recognised by org.jboss.deplo
            yers.vfs.plugins.structure.jar.JARStructure@e31e33
            


            ;-)

            The FileStructure recognision was only meant for the last part of my post - where I mention replacing NotDeployed with NoChildContexts. And how this is probably not a generic solution. ;-)