1 Reply Latest reply on Aug 26, 2005 2:10 AM by mikezzz

    Unit tests and jndi and JMXTestTask.java

    acoliver

      I was trying to run/write some unit tests... hit the src/test/org/jboss/mail/test/JMXTestTask.java whic hseems to want to look up the naming context provider but seems to not succeed. Noticed there was no way to give it the classpath...is this working for anyone else?

        • 1. Re: Unit tests and jndi and JMXTestTask.java

          ./build.sh test

          Will start jboss, sleep, run all of the unit tests, shutdown jboss and produce the report. It needs some libraries in the classpath, these are set up in the (build.sh/build.bat) script. If you want to run the task from eclipse then you will need to configure your ant to have these extra libraries. It requires $JBOSS_HOME/client/jbossall-client.jar and $JBOSS_HOME/client/log4j.jar.

          I haven't delved into the depths of ant classloading to figure out how to add jars to the classpath for a custom task.

          Occasionally it fails with ClassDefNotFound, in that case run dev-deploy then run test. If it falls over with a different exception run the test task with the -verbose option on. It will give the stack trace of the offending code.

          Mike.