Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353014

Summary: TimeoutExchangeTest running too long
Product: [RT] Jetty Reporter: Thomas Becker <tbecker>
Component: clientAssignee: Thomas Becker <tbecker>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: gregw, jetty-inbox, mgorovoy
Version: 7.4.2   
Target Milestone: 7.5.x   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
proposed patch none

Description Thomas Becker CLA 2011-07-25 11:31:07 EDT
Build Identifier: 

I basically reduced all the timeout,sleep,etc. values to have the test running faster in the proposed patch. I don't expect any issues with it, but it might cause timing issues on certain platforms. So we need to keep this in mind.

I also tried to use and share a single httpClient. But it didn't work with one of the tests and the speed gain was not so big. So I didn't invest more time in this. Server is shared now though.

Reproducible: Always
Comment 1 Thomas Becker CLA 2011-07-25 11:36:09 EDT
Created attachment 200290 [details]
proposed patch
Comment 2 Thomas Becker CLA 2011-07-25 11:37:02 EDT
Runtime reduced from >10s to ~2s
Comment 3 Michael Gorovoy CLA 2011-08-29 16:24:19 EDT
Thomas,

I've committed your patch with a few changes intended to make the test more readable. I also tested your changes on a slow machine, and fixed one of the test cases that failed in that environment. The end result run time is about 2.5s.

Cheers,
Michael
Comment 4 Greg Wilkins CLA 2011-08-29 21:20:05 EDT
remember when addressing these long test issues, it is often best to go to a solution that uses latches rather than just reducing timeouts.

Timeouts will always be non-deterministic and latches can often reduce a 10s test to milliseconds as their is no need to wait more than minimal time.
Comment 5 Jesse McConnell CLA 2011-09-20 15:52:13 EDT
Resolved -> Closed