1 Reply Latest reply on Aug 17, 2007 12:38 PM by ryan.campbell

    Problem with start ant task in trunk

    ivanneto

      I was trying to run some testsuite tests and noticed that after starting a server with the "start" ant task, the server was started but the ant script stayed blocked and a long time after failed. I looked at the server log and the server was started correctly. So, I thought that the "start" task wasn't able to detect that the server was successfully initiated.

      Looking at:

      org.jboss.test.util.server.ServerController.isServerStarted(Server server)


      I saw how the "start" ant task checks to see if the server has been started. It opens a HttpURLConnection to the server and then calls getResponseCode(). With an old version of the SVN trunk (some months old), the getResponseCode() returns 200 and everything works OK. With the SVN trunk version from yesterday (05/24/2007), I don't know why the server answers with the HTTP 400 code. Then this check:

      if (responseCode > 0 && responseCode < 400)

      in ServerController.isServerStarted() fails and the ant "start" task fails.

      My point is: if there's a Web server answering with a 400 code, shouldn't org.jboss.test.util.server.ServerController assume that the server has been started correctly?

      Regards,
      Ivan

        • 1. Re: Problem with start ant task in trunk

          I don't think so. I believe it is trying to check the index page of ROOT.war. If this page is returning a 400 error then something is wrong, even if the server is started. I would much rather the test suite fail early rather than allow the run to proceed and provide meaningless results.

          It should have failed and reported the error that it found, did it not do so?