On Tue, 9 Mar 2021 05:32:28 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> This a new test that runs jstack on a process that is busy doing things. It
>> runs jstack 4 times as the process is starting up.
>
> test/jdk/sun/tools/jhsdb/JStackStressTest.java line 91:
>
>> 89: } else {
>> 90: System.out.println("Jshell not alive");
>> 91: }
>
> Shouldn't we use `Process::waitFor` at this point to ensure the jshell is
> terminated? This test might not have enough time to shutdown since issuing
> `/exit`.
> `destroy()` should be called when timeout is happened at `waitFor()`.
Yeah, I'll do that. Not sure why I didn't do it that way in the first place. I
think I copied this from somewhere, but now I can't find where.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2720