avocado/utils/network.py: use random port allocation by default
AFAICT, most users of find_free_port() don't really care about the
port number being the first in the range, and to be honest, most users
I've seen don't even give a range.
So, the result when using the first port in the range is a high change
of collision, with no real benefit. Let's change the default policy,
using a random port allocation.
PS: this is motivated by real world collisions I've experienced when
running tests in parallel, *and* when running other loads in the same
machine along tests.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录