This fails because when the entity using the port is stopped+unmangaed, nothing calls PortSupplier.releasePort(int) - i.e. nothing calls LocalhostMachine.releasePort(int).
This is very minor.
It does work if it was a LocalhostMachineProvisioningLocation, and the machine is released (which is the much more common use-case).
See
brooklyn.event.basic.PortAttributeSensorAndConfigKeyTest. testStoppingEntityReleasesPortFromMachineForReuse()
, which sneaked in at the end of PR https://github.com/brooklyncentral/brooklyn/pull/1427.This fails because when the entity using the port is stopped+unmangaed, nothing calls
PortSupplier.releasePort(int)
- i.e. nothing callsLocalhostMachine.releasePort(int)
.This is very minor.
It does work if it was a LocalhostMachineProvisioningLocation, and the machine is released (which is the much more common use-case).