RFR: 8285785: CheckCleanerBound test fails with PasswordCallback object is not released

Roger Riggs rriggs at openjdk.java.net
Thu Apr 28 13:38:06 UTC 2022


On Thu, 28 Apr 2022 12:19:35 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Hi,
>> 
>> May I have this test update reviewed?
>> 
>> The javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java test case failed on one of the test setups.  The test runs gc in a loop and expects the GC to have garbage collected contents of a WeakHashMap. The loop runs for 10 iterations. Some delay needs to be added between each iteration to increase the chances of GC garbage collecting the instances.
>> 
>> Thanks,
>> Xuelei
>
> test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java line 50:
> 
>> (failed to retrieve contents of file, check the PR for context)
> Looks ok to me although @RogerRiggs commented in the previous PR that 10ms should be sufficient.

Alternatively, the loop count could be raised by 10x.
That would keep the typical running time low and still allow for a worst case.
Your choice.

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

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



More information about the security-dev mailing list