the build helper has a goal for this. On Jul 31, 2011, at 12:09 PM, Mark Struberg <strub...@yahoo.de> wrote:
> Hi Olivier! > > Do you have a sample how to incorporate this into our unit tests? I only knew > that jetty is able to assign a random port for the stop port, but didn't know > that the same exists for the serving port. > > LieGrue, > strub > > --- On Sun, 7/31/11, Olivier Lamy <ol...@apache.org> wrote: > >> From: Olivier Lamy <ol...@apache.org> >> Subject: Re: Random errors in parallely executed tests >> To: "Maven Developers List" <dev@maven.apache.org> >> Date: Sunday, July 31, 2011, 3:55 PM >> Hello >> Jetty is normally able to start on a random port. >> I have fixed that recently in archetype. >> Imho better solution. >> Which tests fail for this reason ? >> >> -- >> Olivier >> send from a mobile >> Le 31 juil. 2011 17:43, "Mark Struberg" <strub...@yahoo.de> >> a écrit : >>> Hi! >>> >>> While browsing our CI results I saw randomly failing >> tests. Most of them >> are caused by starting jetty on a specific port which >> already is in use by >> another test. >>> >>> java.net.BindException: Address already in use >>> at sun.nio.ch.Net.bind(Native Method) >>> >>> Clearly if 2 unit tests fire up a jetty instance on >> the same port, then >> this cannot run in parallel >>> >>> >>> Proposal: >>> >>> What if we add a property in the maven-surefire-plugin >> to name a semaphore >> resource? >>> >>> <resource>port1080</resource> >>> >>> This could be a comma separated list. Surefire will >> then check if any >> resource is blocked before scheduling the next test. >>> The problematic part of course is that surefire must >> communicate this over >> multiple parallel builds. >>> >>> WDYT? >>> >>> LieGrue, >>> strub >>> >>> >>> >> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org >>> For additional commands, e-mail: dev-h...@maven.apache.org >>> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org