Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-35

MantisTask tries to get exit code before process is finished

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V1Alpha
    • V1Alpha
    • Controls
    • None
    • beehive on red hat enterprise linux 3

    Description

      In /controls/test/tools/mantis/src/org/apache/beehive/test/tools/mantis/MantisTask.java, the method MantisTask.execute() tries to print an exit code for a process. However, this leads to an error if the process has not exited yet:

      mantis:
      [mantis] running command:
      [mantis] /opt/jdk1.5.0/bin/apt -nocompile -classpath /opt/jdk1.5.0/lib/tools.jar:/home/bche/src/svn/beehive/v1-alpha/installed/apache-ant-1.6.2/lib/ant.jar:/home/bche/src/svn/beehive/v1-alpha/external/junit/junit.jar:/home/bche/src/svn/beehive/v1-alpha/external/servlet/servlet-api-2.4.jar:/home/bche/src/svn/beehive/v1-alpha/controls/test/infra/milton/milton.jar:/home/bche/src/svn/beehive/v1-alpha/controls/test/infra/tch/schema.jar:/home/bche/src/svn/beehive/v1-alpha/controls/test/infra/mantis/mantis.jar:/home/bche/src/svn/beehive/v1-alpha/external/xmlbeans/apache-xbean.jar:/home/bche/src/svn/beehive/v1-alpha/installed/jsr173/jsr173_1.0_api.jar:/home/bche/src/svn/beehive/v1-alpha/controls/build/jars/controls.jar:/home/bche/src/svn/beehive/v1-alpha/controls/test/build/classes/beans:/home/bche/src/svn/beehive/v1-alpha/controls/test/build/classes/drivers -s /home/bche/src/svn/beehive/v1-alpha/controls/test/mantis-cases -d /home/bche/src/svn/beehive/v1-alpha/controls/test/mantis-bingen -factory org.apache.beehive.test.tools.mantis.MantisFactory -Aconfig=/home/bche/src/svn/beehive/v1-alpha/controls/test/infra/mantis/mantis.properties @/home/bche/src/svn/beehive/v1-alpha/controls/test/mantis-cases/files.txt

      BUILD FAILED
      /home/bche/src/svn/beehive/v1-alpha/build.xml:59: The following error occurred while executing this line:
      /home/bche/src/svn/beehive/v1-alpha/controls/build.xml:210: The following error occurred while executing this line:
      /home/bche/src/svn/beehive/v1-alpha/controls/test/build.xml:301: The following error occurred while executing this line:
      /home/bche/src/svn/beehive/v1-alpha/controls/test/build.xml:141: The following error occurred while executing this line:
      /home/bche/src/svn/beehive/v1-alpha/controls/test/build.xml:454: java.lang.IllegalThreadStateException: process hasn't exited

      The proper thing to do is to call Process.waitFor() rather than Process.exitValue()

      Attachments

        1. MantisTask.java.patch
          0.1 kB
          Bryan Che

        Activity

          People

            jsong James Song
            bryanche Bryan Che
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: