I just made a big commit to camel-cxf that gets enough of the tests switched over to dynamic ports and unique contexts that I was able to switch from forkMode=perTest to once. This makes a HUGE difference as it drops the tests from 5min 50 secs down to a total of 57 seconds on my machine.
The main thing I did was consolidate all the tests I could to using the same set of ports managed by a new CXFTestSupport class (which dynamically sets the port numbers). Each test uses a unique context on that port, usually the name of the test class. So instead of http://localhost:9000/foo, the new URL's are things like "http://localhost:" + port + "/CxfFooTest/foo" or similar. This saves a ton of time of not starting/stopping ports, etc... There is one minor downside right now in that many tests don't have proper teardowns so the endpoints remain registered (which is partially why I added the unique contexts) holding memory and such, but it's not too bad. If we tried forkMode=once with unique ports instead of contexts, it would not only leak the memory, but could have file handle issues and such as the ports would remain open. In anycase, there are still a bunch of tests that aren't flipped over to the dynamic ports yet, but they don't conflict with each other so aren't a problem right now. I'll tackle them as I get to them. Enjoy the faster builds! -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
