Commit bbea315f authored by Tobias Thierer's avatar Tobias Thierer
Browse files

Work around ServerSocketConcurrentCloseTest flakiness

The test involves 100 iterations of a client and server thread
connecting to each other and disconnecting over and over, until
the ServerSocket involved is closed at the end of the iteration.

Before this CL, each iteration took 50msec (counted from when
the threads signaled that they had started running by counting
down a latch. On recent builds on some devices, the two threads
didn't manage to establish any connection within those 50msec
but only when other tests had run previously. The exact cause
for this was not determined, but threads left over from over
from previous tests appeared to not be involved.

This CL increases the maximum time for each iteration to a maximum
of 150msec (in steps of 50msec, until at least one connection was
established), which makes the test pass (5/5 tries) on a device
where it previously consistently failed (15/16 tries failed).

Test: CtsLibcoreTestCases (on affected device)
Bug: 62859398

(cherry picked from commit 7956ee19)

Change-Id: I19368fa2cac3b43f4c361b785c9ff3202c87652f
parent 010656b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment