Port allocation needs to handle the case of port already being bound

Description

Tests have started to collide with ports that are bound by different stuff that is permanently running on the machine. For example OSM agent on azure VMs. The port allocator “should” be returning only open ports, but as noticed in: https://ci-master.corda.r3cev.com/viewLog.html?buildId=192061&buildTypeId=CordaEnterprise_Build
Running on ci-agent 23 - RaftNotaryServiceTests.detect double spend fails because of an already bound port. This also happens on agent 200 clashing with the docker proxy port.

Status

Assignee

Viktor Kolomeyko

Reporter

Stefan Iliev

Labels

Feature Team

Performance and Platform Sustainability

Story Points

None

Fix versions

Ported to...

Corda 4.3

Priority

High
Configure