[TestBug] RFR : JDK-8192909 - Invalid username or password in HashedPasswordFileTest.java

Harsha Wardhana B harsha.wardhana.b at oracle.com
Tue Dec 5 16:15:27 UTC 2017


Thanks Daniel and Christoph for review.

-Harsha

On Tuesday 05 December 2017 08:11 PM, Daniel Fuchs wrote:
> +1
>
> -- daniel
>
> On 05/12/2017 12:04, Harsha Wardhana B wrote:
>> Hi Daniel,
>>
>>
>> On Tuesday 05 December 2017 03:42 PM, Daniel Fuchs wrote:
>>> Hi Harsha,
>>>
>>> Looks good.
>> Thanks for the review.
>>>
>>> nit:
>>>
>>>  366                 if(random.nextBoolean()) {
>>>  367                     String[] tokens = line.split("\\s+");
>>>  368                     if ((tokens.length == 4 || tokens.length == 
>>> 3)) {
>>>
>>> inverting the two if () (testing for the applicability of the line
>>> first) would probably give a better chance that an existing
>>> password is replaced, unless most lines are applicable.
>> All the lines will be applicable. The password file will be hashed 
>> before the above lines are executed. An Assert statement at line 353 
>> makes sure of that. Hence no point inverting the two if().
>>>
>>> best regards,
>>>
>>> -- daniel
>> Regards
>> Harsha
>>>
>>> n 04/12/2017 18:27, Harsha Wardhana B wrote:
>>>> Hi All,
>>>>
>>>> Please review and provide comments for fix for,
>>>>
>>>> issue: https://bugs.openjdk.java.net/browse/JDK-8192909
>>>>
>>>> having webrev at,
>>>>
>>>> webrev : http://cr.openjdk.java.net/~hb/8192909/webrev.00/
>>>>
>>>> Fix details: The test was failing intermittently because of 
>>>> duplicate entries for role in input password file. The duplicate 
>>>> entries get over-written by JMX agent, but the client was testing 
>>>> with stale entries for duplicated role. Also, the test now uses a 
>>>> single random number generator from test package 
>>>> (Utils.getRandomInstance) instead of two.
>>>>
>>>> Regards
>>>>
>>>> Harsha
>>>>
>>>
>>
>



More information about the serviceability-dev mailing list