On Wed, 1 Nov 2023 00:06:35 GMT, Leonid Mesnik <[email protected]> wrote:
> Test thread factory is a mode similar to VM flags and should not be used in
> ProcessTools.createLimitedTestJavaProcessBuilder(). Only
> createTestJavaProcessBuilder() should use it like jtreg VM options.
>
> Adding the test thread factory requires the injection of arguments in the
> middle of the list. I don't think it makes sense to modify arguments in
> several places so I replaced it with the flag isLimited and moved all
> modifications in createJavaProcessBuilder().
>
> Testing tier1-5.
test/lib/jdk/test/lib/process/ProcessTools.java line 451:
> 449: * @return The ProcessBuilder instance representing the java command.
> 450: */
> 451: private static ProcessBuilder createJavaProcessBuilder(boolean
> isLimited, String... command) {
addThreadFactory might be a more appropriate name
However, Stefan has a more SOLID suggestion
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16442#discussion_r1382236083