10 Replies Latest reply on Feb 15, 2007 6:23 PM by clebert.suconic

    Remote Tests

    ovidiu.feodorov

      The current test suite was able to run remote tests only by using an external JBoss instance, and only if JBoss Messaging was deployed in advance under that instance.

      I changed that so now the test suite is able to run remote tests independently of the presence of any JBoss instance. It does that by starting the ServiceContainer in a separate VM. The ServiceContainer is managed via a lightweight RMI server.

      The target "tests" depends on two new targets "invm-tests" and "remote-tests". "invm-tests" sets the "remote" system property to "false" and runs everything as before. "remote-tests" sets "remote" to "true" and only runs org.jboss.messaging.jms tests (it could run everything, but it will just repeat the other tests, as they ignore the "remote" system property, which doesn't make too much sense). The "remote-tests" starts the external RMI server before running the tests and stops it once it is done.

      To run all tests with both configurations and get a test report:

      cd tests
      ./build.sh report
      


      To run a single remote test without ant:

      cd tests/bin
      ./runtest -remote
      


      The runtest script starts and stops its own external RMI server.

      There is also a tests/bin/stop-rmi-server script that can be used to get rid of runaway RMI servers.


        • 1. Re: Remote Tests

          And I'll ask again.

          Why is JBoss Messaging developing its own test harness when it could share with others.

          Another example:

          I've just resynched with head and find JBoss Messaging is now developing its
          own ant tasks that are really a fork of something Clebert wrote.

          If these were ant tasks related to messaging I could understand it!

          At this rate, it is going to take me months to put JBoss5 out
          as I try to untangle the dependency issues across all these
          "I want to do it my way" projects.

          Let alone supporting all these forks and duplicate solutions to the same problems
          going forward.

          • 2. Re: Remote Tests
            ovidiu.feodorov

             


            Why is JBoss Messaging developing its own test harness when it could share with others.


            I answered this already: "PerfRunner - jrunit" http://www.jboss.org/index.html?module=bb&op=viewtopic&t=72958.

            JRunit is overkill for this specific functionality I needed now, which consisted in a simple RMI server and a couple of tweaks in the build.xml files. When we'll be done with it, we'll sit together with JRunit team and merge functionality.


            I've just resynched with head and find JBoss Messaging is now developing its own ant tasks that are really a fork of something Clebert wrote.


            It's not an ant task, it's a six line formatter. Literally. Clebert's work is under testsuite and I didn't find a quick way to link it to my project, lest of hardcoding paths relative to testsuite. Moreover, it's not really worth doing it for a six-line class.




            • 3. Re: Remote Tests

              And what happens when JBoss Messaging moves to its own project
              but I want to consolidate its testsuite into a global "JEMS Suite",
              not just for our internal testing but for other ISVs who want to ship their own
              configurations?

              As we discussed before there is more here than a 6 line class.

              All these "It's not worth it, I'll just do, etc." won't work.

              I guess it is another problem for somebody else to fix down the road...

              • 4. Re: Remote Tests
                ovidiu.feodorov

                Fine, I'll get rid of the formatter.

                How do I use the "testsuite" one?

                I didn't find any way of importing "testsuite" as a module, no "jboss.testsuite.classpath".

                Please advise.

                • 5. Re: Remote Tests

                  jboss.test.classpath

                  I spent some time early this year moving the core testsuite classes into
                  a separate project for use by standalone projects.

                  But it still needs documenting, Christoph volunteered at one point, but nothing happened ;-)
                  http://jira.jboss.com/jira/browse/JBAS-1770 + releated discussions

                  • 6. Re: Remote Tests
                    ovidiu.feodorov

                    org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter it's not under jboss.test.classpath.

                    It's under jboss-head/testsuite/src/main/org/jboss/ant/taskdefs

                    • 7. Re: Remote Tests

                      Then fix it. :-)

                      • 8. Re: Remote Tests
                        ovidiu.feodorov

                        I knew we'll get here from the moment I wrote the first line of those six (I actually I copied them) :))

                        No, I'll raise a JIRA issue with the AS, I'll register a listener to it and I'll change my code accordingly when it's done :)

                        I have WAY too many things to break within my own project than breaking other people's stuff :)

                        • 9. Re: Remote Tests
                          ovidiu.feodorov
                          • 10. Re: Remote Tests
                            clebert.suconic

                            Almost 1.5 years later :-)... I'm about to remove this formatter.

                            As I'm importing JBossTestCase for the new MDB integration tests I'm writting, as I had my hands on it.. I'm also removing this.

                            I will commit this with everything I'm working on now.