RFR: 8183374: Refactor java/lang/Runtime shell tests to java

Fernando Guallini fguallini at openjdk.java.net
Mon Apr 19 15:13:04 UTC 2021


Refactor the following shell tests to java:
test/jdk/java/lang/RuntimeTests/shutdown/ShutdownHooks.sh
test/jdk/java/lang/Runtime/exec/SetCwd.java

In addition, the test SetCwd was running itself in separate java subprocesses in order to exercise Runtime.exec. It was creating a folder structure with multiple test class copies to distinguish between main and child processes to prevent an infinite recursion. That logic is simplified now, tests follow the testng annotations flow whereas the subprocesses entry point is a nested class main

-------------

Commit messages:
 - Merge branch 'master' of github.com:openjdk/jdk into 8183374
 - refactor ShutdownHooks and SetCwd

Changes: https://git.openjdk.java.net/jdk/pull/3572/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3572&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8183374
  Stats: 232 lines in 4 files changed: 67 ins; 121 del; 44 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3572.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3572/head:pull/3572

PR: https://git.openjdk.java.net/jdk/pull/3572


More information about the core-libs-dev mailing list