ah, I knew you did something like this but could not find it :) question: ok, random port, but random and guaranteed to success? ie it makes the effort to find an unused port? see r1152587: I chose an arbitrary port
we should add this to a FAQ, since this is a common use case Regards, Hervé Le dimanche 31 juillet 2011, Olivier Lamy a écrit : > 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