diff options
author | Tobias Thierer <tobiast@google.com> | 2017-02-06 19:31:43 +0000 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2017-02-07 19:56:19 +0000 |
commit | d34eda70e409468f3d9294e26cb187302ddc532f (patch) | |
tree | 6cfbcd15fe21a6fad74e7218f8327b93e8d635d4 /annotations/generate_annotated_java_files.py | |
parent | 30824eef475aa2e398f889b497917fc728ffe5ec (diff) |
De-flake and refactor FtpURLConnectionTest
- There was a race condition where the client thread's socket.connect()
could occur before the server's serverSocket.accept(), in which case
the socket was closed before any connection could occur. The client
now waits 300msec for the server to start up before connect()ing.
- To ensure the server gets around to processing any pending connection,
the client now waits for 300msec for any remaining/excessive
connections to occur.
- Increase the client's timeout for connect() from 10msec to 200msec
(after having given the server time to start up).
- Split the assertion of # of connections out of the shutdown logic
and move it outside of the finally block.
Bug: 34805182
Test: FtpURLConnectionTest
Test: Modified FtpURLConnectionTest.testCountingProxy() to run 100x
in a loop, then ran the modified FtpURLConnectionTest once
Change-Id: I558b0d6449adf1d0304180e9bf8f2502bd678c8a
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions