Community
Participate
Working Groups
Build Identifier: HttpExchangeTest is running longer than necessary. The patch I will provide reduces runtime of the Unit Tests from about 15s to 2.5s on my MacBook. Main changes: - only start/stop the server once per class instead of per test - Same for the client with one exception (testReserveConnections). - don't sleep for 500ms until the client is stopped, instead wait for client state to change to STOPPED Patch attached. Reproducible: Always
Created attachment 200272 [details] proposed patch
Be aware that with the proposed patch each test is not anymore getting a fresh server and httpClient. From the code it looks fine (except testReserveConnections), so I reused the same instances of server and client.
Created attachment 200277 [details] proposed patch - VERSION.txt fix
Re-assigning to Thomas.
One suggestion I would like to make is that it is better not to reformat existing code unless absolutely necessary, otherwise the important changes are buried in a flood of spaces-only diffs.
I will split the code format into a second patch next time. The code is formatted using the jetty code templates, but should have been done in an individual patch so one can identify the "real" changes immediately.
Don't commit this, until I finished the subclasses of this test!
*** This bug has been marked as a duplicate of bug 353509 ***