Beehive
  1. Beehive
  2. BEEHIVE-35

MantisTask tries to get exit code before process is finished

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V1Alpha
    • Fix Version/s: V1Alpha
    • Component/s: Controls
    • Labels:
      None
    • Environment:
      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()

        Activity

        James Song made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        James Song added a comment -

        This is fixed by r56008.

        Show
        James Song added a comment - This is fixed by r56008.
        James Song made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Assignee Bryan Che [ bryanche ] James Song [ jsong ]
        Hide
        James Song added a comment -

        This is fixed by applying Bryan's fix. r56008.

        Show
        James Song added a comment - This is fixed by applying Bryan's fix. r56008.
        Bryan Che made changes -
        Field Original Value New Value
        Attachment MantisTask.java.patch [ 18048 ]
        Hide
        Bryan Che added a comment -

        This is a patch to fix this bug.

        Show
        Bryan Che added a comment - This is a patch to fix this bug.
        Bryan Che created issue -

          People

          • Assignee:
            James Song
            Reporter:
            Bryan Che
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development