Code Review Request JDK-8161106 Improve SSLSocket test template

Xuelei Fan Xuelei.Fan at Oracle.Com
Wed Oct 26 16:45:10 UTC 2016


The new test case is just a test in order to make sure this approach works in the testing environment.  I plan to remove both of the sample and template, and re-org them to a class that can be inherited from.

Xuelei

> On 27 Oct 2016, at 12:31 AM, Bradford Wetmore <bradford.wetmore at oracle.com> wrote:
> 
> Xuelei,
> 
> Sorry that I didn't have time to look at this earlier.
> 
> Why did you create a new file SSLSocketSample.java instead of just updating SSLSocketTemplate.java?  Why should I use one vs the other?
> 
> IMHO, unless there's a good reason to keep both, we should just copy the contents of SSLSocketSample.java to SSLSocketTemplate.java, and remove SSLSocketSample.java.
> 
> Brad
> 
> 
> 
>> On 7/24/2016 10:22 PM, Weijun Wang wrote:
>> 
>> 
>>> On 7/25/2016 13:14, Xuelei Fan wrote:
>>>> On 7/25/2016 12:15 PM, Weijun Wang wrote:
>>>> Is it possible to use a single new CountDownLatch(2)?
>>>> 
>>> Per the spec, the countDown() release all waiting threads if the count
>>> reaches zero, and the await() will not return until the latch has
>>> counted down to zero, or interrupted or timeout.  It's difficult to use
>>> one instance of CountDownLatch(2) for two conditions.
>> 
>> Ah, yes. I forgot about that.
>> 
>>> 
>>>> Also, I think comments on lines 145-149 and 199-203 are not really
>>>> necessary, the println() lines after them are quite clear.
>>>> 
>>> The comments make the logic easier to understand, I think.  Let's keep
>>> the comments if it is not a big concern of yours.
>> 
>> Sure.
>> 
>> So everything looks fine to me.
>> 
>> Thanks
>> Max
>> 
>>> 
>>> Thanks,
>>> Xuelei
>>> 
>>>> --Max
>>>> 
>>>>> On 7/25/2016 11:38, Xuelei Fan wrote:
>>>>> Hi Weijun,
>>>>> 
>>>>> Please review this update.  Per you suggestion, I updated to use
>>>>> CountDownLatch for the synchronization between client and server.
>>>>> CountDownLatch is more simple than ReentrantLock in the context.
>>>>> 
>>>>>    http://cr.openjdk.java.net/~xuelei/8161106/webrev.03/
>>>>> 
>>>>> Thanks,
>>>>> Xuelei
>>>>> 
>>> 



More information about the security-dev mailing list