On Thu, 27 Jun 2024 10:00:31 GMT, Fernando Guallini <fguall...@openjdk.org> wrote:
>> Try if this class works for you. >> https://github.com/openjdk/jdk/blob/45a616a891e4a4b0e77b1f2fa040522f4a99d172/test/jdk/sun/security/tools/keytool/KeyToolTest.java#L1885 > > @wangweij > I was handling the callback in 2 separate calls because it was blocking and > timing out while waiting for input. Now, using _HumanInputStream_ allows > handling it in a single call. Unfortunately this class is not visible for > this jteg test. To compile it properly, I would need to include the following > annotations in the test: > > * @modules java.base/sun.security.tools.keytool > * java.base/sun.security.util > * java.base/sun.security.x509 > * @compile ../../../../../../sun/security/tools/keytool/KeyToolTest.java > > But, this would couple both tests together. would it be useful extracting > HumanInputStream into a common library class? Sure, you can put it into `test/jdk/java/security/testlibrary`. I'm not sure if it's mature enough to be put into `test/lib`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19790#discussion_r1657075650