| Summary: | jetty-client unit tests are running too long | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Thomas Becker <tbecker> | ||||||
| Component: | client | Assignee: | Joakim Erdfelt <joakim.erdfelt> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | minor | ||||||||
| Priority: | P3 | CC: | jetty-inbox, joakim.erdfelt, mgorovoy | ||||||
| Version: | 7.4.2 | ||||||||
| Target Milestone: | 7.5.x | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Thomas Becker
Created attachment 200662 [details]
patch with refactored tests
*** Bug 352991 has been marked as a duplicate of this bug. *** Runtime Changes of tests changed: HttpExchangeTest: was: ~13s now: ~2.7s AsyncSslHttpExchangeTest: was: ~10s now: ~2s SslHttpExchangeTest: was: ~8.5s now: ~2s ExternalKeyStoreAsyncSslHttpExchangeTest: was: ~8.3s now: ~2s Overall about 30s saved. Thomas, I would suggest not to move the code that creates the server and client objects to a separate set of classes. It is unlikely that we will be able to reuse the code that creates these objects because it is often unique to each test. Yet it makes the test code even less readable when it is right now. The test performance improvements in the current patch are obscured by the re-factoring and re-formatting changes, so in my opinion it would be best if we commit the changes that affect test performance separately, and then decide if further re-factoring of the tests is needed. Thanks, Michael The patch no longer applies. But I can see what you were doing. So I'll manually merge it. Have finished manually merging this patch. It doesn't run/test successfully tho. See new branch 'bug-353509' for details. $ git branch --track bug-353509 refs/remotes/origin/bug-353509 Created attachment 203320 [details]
Fix of issues after merge
Hi Joakim,
attached a first patch fixing some merging issues. Basically you forgot to merge few lines of code. These are fixed now.
There's one problem left breaking the "testOptionsWithExchange" test in all 4 variants of the unit test:
testOptionsWithExchange(org.eclipse.jetty.client.AsyncSslHttpExchangeTest): Response does not contain Allow header
testOptionsWithExchange(org.eclipse.jetty.client.ExternalKeyStoreAsyncSslHttpExchangeTest): Response does not contain Allow header
testOptionsWithExchange(org.eclipse.jetty.client.HttpExchangeTest): Response does not contain Allow header
testOptionsWithExchange(org.eclipse.jetty.client.SslHttpExchangeTest): Response does not contain Allow header
I will dig deeper into that one in my afternoon after aligning with you.
Cheers,
Thomas
Considering this fixed. Not much more test timing can be eked out of jetty-client. Setting to fixed. |