[PATCH stable?] run-test: ensure the test port are available before launching test

Augie Fackler raf at durin42.com
Fri May 8 14:55:06 CDT 2015


On Thu, May 07, 2015 at 11:14:07PM -0700, Pierre-Yves David wrote:
>
>
> >    Choosing random number for each test does not guarantee test will
> >    not choose overlapping port number. The math says there is more than
> >    99% change it will happen.
> >
> >
> >Err, yeah.
> >
> >Have the test runner choose N random ports when the test executes. Keep
> >track of which ports are reserved. Refuse to try those until the test
> >finishes executing. That is doable. And it doesn't require nested range
> >loops.
>
> We have nested for loops because we bound the amount of tries, and each test
> get assigned multiple ports. I do not see these double for going away in
> another implementation. I also not sure why you flag that as "complicated".

So, having looked at the patch, it seems like enough of an improvement
on the status quo that I'd like it on default (definitely not
appropriate for stable!), but we should also try and nerd-snipe
someone into doing work around true random port selection.

(pyd: feel encouraged to push this to the clowncopter if you like)

>
> --
> Pierre-Yves David
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list