Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8353489

Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Please create an issue for the pull request: https://github.com/openjdk/jdk/pull/23933

      Short description:

      This PR proposes three improvements to the Basic.java test:

          Increase Timeout
              The current timeout is insufficient when running the test in IntelliJ IDEA.
              I propose increasing it by one minute.
              The timeout value was last modified on May 13, 2010 (commit 56131863a71c) and has remained unchanged since then.

          Fix Incompatibility with Windows (Cygwin vs. Native)
              One of the tests executes the echo command.
              This works in Cygwin but fails when running the test in a pure Windows environment (e.g., IntelliJ IDEA).
              I propose replacing echo with cmd /c echo., which produces the same output (a single newline) in Windows, ensuring compatibility.

          Prevent Autorun Scripts in the cmd /c set Command
              The test runs cmd /c set, but in Windows, this may trigger autorun scripts.
              I propose adding the /d options to prevent autorun scripts from affecting the test results.

      These changes improve test reliability and ensure compatibility across different environments.
      Testing:

          Verified that the test runs successfully in IntelliJ IDEA without timeout issues.
          Confirmed that cmd /c echo. produces the expected output in Windows.
          Ensured that cmd /d /c set correctly lists environment variables without executing autorun scripts.



            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: