Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky URLConnectionTest.serverShutdownOutput test
There are usually 2 requests sent to '/b' during the test: square#1 on the busted connection, attempting reuse square#2 on a new connection On successful runs, the server recorded square#1 and then square#2 and added them to the queue in that order. On failed runs, the server started reading request square#1 before square#2, but there was a context switch, and it finished reading square#2 before square#1, recording them in that order. Since square#1 was the last to be recorded, the test incorrectly used it to assert that the sequence number was 0. Since square#1 was the second to be received on the busted connection, it had a sequence number of 1 so the test failed. The fix removes the assumption that square#2 is the last to be recorded. Fixes square#4140.
- Loading branch information