Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-10-26 Thread Artem Smotrakov
There is SSLTest.java which follows SSLSocketSample.java and can be used by other tests. Artem On 10/26/2016 09:45 AM, Xuelei Fan wrote: 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, a

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-10-26 Thread Xuelei Fan
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 > wrote: > > Xuelei, > > So

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-10-26 Thread Bradford Wetmore
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 SSLSocke

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-24 Thread Weijun Wang
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,

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-24 Thread Xuelei Fan
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 diffic

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-24 Thread Weijun Wang
Is it possible to use a single new CountDownLatch(2)? Also, I think comments on lines 145-149 and 199-203 are not really necessary, the println() lines after them are quite clear. --Max On 7/25/2016 11:38, Xuelei Fan wrote: Hi Weijun, Please review this update. Per you suggestion, I update

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-24 Thread Xuelei Fan
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 On 7/14/2016 1:

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-13 Thread Artem Smotrakov
Hi Xuelei, The webrev looks good to me. Please see inline. On 07/12/2016 10:36 PM, Xuelei Fan wrote: Thanks for the feedback, Artem. Here is the updated webrev per your suggestions: http://cr.openjdk.java.net/~xuelei/8161106/webrev.02/ On 7/13/2016 1:03 AM, Artem Smotrakov wrote: Hi Xu

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-12 Thread Xuelei Fan
Thanks for the feedback, Artem. Here is the updated webrev per your suggestions: http://cr.openjdk.java.net/~xuelei/8161106/webrev.02/ On 7/13/2016 1:03 AM, Artem Smotrakov wrote: > Hi Xuelei, > > I am not an official reviewer, but I have a couple of comments. > > 1. line 149: would it be

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-12 Thread Artem Smotrakov
Hi Xuelei, I am not an official reviewer, but I have a couple of comments. 1. line 149: would it be better to check this condition in a loop? 2. Using try-with-resources blocks might simplify doServerSide() a little bit (no need to call close() on sockets, and a couple of "try" blocks might b

Re: Code Review Request JDK-8161106 Improve SSLSocket test template

2016-07-10 Thread Xuelei Fan
There is a nice catch of the timeout miss-match during the handling of serverIsReady in doClientSide(). Here is the updated webrev: http://cr.openjdk.java.net/~xuelei/8161106/webrev.01/ Thanks, Xuelei On 7/11/2016 11:44 AM, Xuelei Fan wrote: > Hi, > > Please review this enhancement of SSL