Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353014 - TimeoutExchangeTest running too long
Summary: TimeoutExchangeTest running too long
Status: CLOSED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: client (show other bugs)
Version: 7.4.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 7.5.x   Edit
Assignee: Thomas Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 11:31 EDT by Thomas Becker CLA
Modified: 2011-09-20 15:52 EDT (History)
3 users (show)

See Also:


Attachments
proposed patch (10.85 KB, patch)
2011-07-25 11:36 EDT, Thomas Becker CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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