Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2985

ProcessWrapper.waitForClose shouldn't close the output stream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.0.0.Alpha1
    • None
    • CLI, Test Suite
    • None

      When the output stream is closed, if aesh is reading on the other side of the stream inside the CLI process, this could make the CLI process to exit. That is occurring systematically with aesh-readline.
      ProcessWrapper.waitForClose is called in the following cases:

      • ctrlCAndWaitForClose: The test expects that Ctrl-C will make the process to exit.
      • pushLineAndWaitForClose: The test expects that the passed command will make the process to exit (e.g.: quit)
      • executeNonInteractive: The test expects that the CLI process will exit by itself, no aesh console started (file or command options). In this case, closing the output stream shouldn't hide any issue. But it shouldn't be required either.

      If closing the output stream makes the CLI process to exit it could hide potential CLI issues.

      I suggest that we remove the output stream.close once we have switched to use aesh-readline and see on all platforms how tests are going to behave. We could have exotic platforms that don't make the process to exit properly if output is not closed. We will have to handle them specificaly.

              jdenise@redhat.com Jean Francois Denise
              jdenise@redhat.com Jean Francois Denise
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: