Code Review Request 8146669 Test SessionTimeOutTests fails intermittently

Xuelei Fan at
Sat Jan 16 00:09:44 UTC 2016

On 1/16/2016 3:54 AM, Sean Mullan wrote:
> It seems like it would be cleaner to use AtomicBoolean for serverReady
> since you are just checking if it is on or off.
Yes.  However, the test may be update to support multiple server
sockets.  If using AtomicBoolean, need a synchronized block to check the
ready state and update serverReady to true.  For such situations, it is
a little bit more simple to use AtomicInteger.


> Otherwise looks fine.
> --Sean
> On 01/13/2016 04:23 AM, Xuelei Fan wrote:
>> Hi,
>> Please review the intermittently test failure fix.
>> In the updated test case, an integer (createdPorts) is used to count the
>> server sockets.  Every server socket is created in a new thread.  The
>> access and update to createdPorts should be synchronized for multiple
>> threading safe.  Update to use AtomicInteger.getAndIncrement() so that
>> the access and update to createdPorts is atomic.
>> Thanks,
>> Xuelei

More information about the security-dev mailing list