brooklyncentral / brooklyn

This project has moved and is now part of the ASF
https://github.com/apache/incubator-brooklyn
72 stars 27 forks source link

Localhost port tracking: record of port usage not released when entity stops #1434

Open aledsage opened 10 years ago

aledsage commented 10 years ago

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 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).