RFR: 8334562: Automate com/sun/security/auth/callback/TextCallbackHandler/Default.java test
Weijun Wang
weijun at openjdk.org
Thu Jun 27 12:50:10 UTC 2024
On Thu, 27 Jun 2024 10:00:31 GMT, Fernando Guallini <fguallini at 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
More information about the security-dev
mailing list