1 Reply Latest reply on Mar 13, 2012 5:21 AM by Ondra Chaloupka

    Problem with AS7 testsuite - multinode testing - incorrect jndi lookup

    Ondra Chaloupka Expert

      Hi,

       

      I have an issue and I want to ask whether is this bug or misconfiguration.

       

      I have test in AS7 testsuite in multinode part where 2 AS7 JBoss servers are run in parallel. The first server is defined to have remote connection to second one.

      I have a Stateful bean placed in both servers. I would like to run test on  first server. But prolem is that when I want to do a jndi lookup Arquillian open connection to second server.

       

      You can check sourcecode of my test here: https://github.com/ochaloup/jboss-as/blob/0fcf1383ffec86f8b1cb8aeee5feed606b27ec3c/testsuite/integration/multinode/src/test/java/org/jboss/as/test/multinode/problem/TestTestCase.java

      Definition of arquillian.xml is here: https://github.com/ochaloup/jboss-as/blob/0fcf1383ffec86f8b1cb8aeee5feed606b27ec3c/testsuite/integration/multinode/src/test/config/arq/arquillian.xml

       

      I have named deployments, defined on which container they should run and the tests are annotated with @OperateOnDeployment.

      The workaround for my problem is to create a "client bean" which is place only on the first server and then make a local call for the statefulbean which I want to use. Then arquillian correctly lookuped the client bean and started to work with it. But when the test called directly the stateful bean it was invoked that one placed on second server.

       

      Then I would have an additional question. Could I define the same archive name for two deployments which go to different servers? When I defined the same archive name in this test then arquillian works (or makes lookups) just on the second server.

       

      Thank you